feat: Replace tautological tests with real IHttpClient injection#112
Merged
Conversation
…sts in DomainClaims
…ent injection across all service modules
Contributor
There was a problem hiding this comment.
5 issues found across 46 files
Confidence score: 3/5
src/main/java/com/resend/services/domains/Domains.javainclaims()drops the injectedIHttpClientby constructingDomainClaimswith the single-arg constructor, so custom/mock clients can be silently bypassed and calls may hit the wrong transport at runtime — pass the injected client through when creatingDomainClaimsbefore merging.src/main/java/com/resend/services/contacts/Contacts.javadoes not propagate the injectedIHttpClientto lazy sub-services (segments,topics,imports), which can cause inconsistent behavior where parent and child services use different clients — wire the same injected client into all sub-service constructors.- Test coverage is a bit weak in
src/test/java/com/resend/services/batch/BatchTest.java,src/test/java/com/resend/services/logs/LogsTest.java, andsrc/test/java/com/resend/services/automations/AutomationsTest.java(unclosedopenMocks, missing pagination size assertion, and missing error-message assertion), so regressions in client wiring and response validation may slip through — tighten these tests and close mock resources (or useMockitoExtension) to de-risk the merge.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/test/java/com/resend/services/logs/LogsTest.java">
<violation number="1" location="src/test/java/com/resend/services/logs/LogsTest.java:87">
P3: Missing assertion on data size in pagination test. testListLogsWithPagination_Success doesn't assert `res.getData().size()`, unlike the cursor tests which verify deserialization produced the expected 3 entries.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
Re-trigger cubic
joaopcm
previously approved these changes
Jun 30, 2026
… test placeholders
ec09f72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.