testing-java
Java testing with JUnit 5 and Mockito: test lifecycle, mocking, and integration test patterns
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Java testing with JUnit 5 and Mockito: test lifecycle, mocking, and integration test patterns
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | testing-java |
| description | Java testing with JUnit 5 and Mockito: test lifecycle, mocking, and integration test patterns |
@Test, @BeforeEach, @AfterEach, @ParameterizedTest).mvn test / gradle test@ExtendWith(MockitoExtension.class)
class OrderServiceTest {
@Mock
private PaymentGateway paymentGateway;
@InjectMocks
private OrderService orderService;
@Test
void shouldThrowOrderExceptionWhenPaymentFails() {
// Arrange
when(paymentGateway.charge(any())).thenThrow(new PaymentException("Declined"));
// Act & Assert
assertThrows(OrderException.class, () -> orderService.placeOrder(testOrder()));
}
}
@ParameterizedTest
@ValueSource(strings = {"", " ", "\t"})
void shouldReturnTrueForBlankStrings(String value) {
assertTrue(StringUtils.isBlank(value));
}
@Mock and @InjectMocks with MockitoExtension — avoid Mockito.mock() in tests.verify(paymentGateway, times(1)).charge(expectedAmount).@Captor to capture and assert arguments passed to mocks.@SpringBootTest for full context; @WebMvcTest for controller slice only.src/integrationTest/ and run in a separate Gradle task.gradle jacocoTestReport and enforce with jacocoTestCoverageVerification.Architecture decisions: layering, design patterns, microservices trade-offs, and domain-driven design
Python architecture: PEP-8, type hints, clean layering, dependency injection, and testing strategy
General code review process: priority ordering, what to block on, how to give actionable feedback
Python data science: notebook structure, data validation, reproducibility, and model documentation
Git workflow: branch naming, conventional commits, PR conventions, and merge strategies
TypeScript refactoring: SOLID principles, DRY, type safety improvements, and eliminating code smells