Write JUnit 5 tests for a Java class
Generates a focused JUnit 5 test class (with Mockito when needed) for one class, covering the happy path, edge cases and failure modes, and explains what it did not cover.
이 리소스는 영어로만 제공됩니다.
프롬프트는 내 어시스턴트에 복사해서 쓰는 텍스트입니다. KitLocal은 프롬프트를 실행하지 않습니다.
변수 입력
입력한 내용은 이 브라우저에만 남습니다. URL에 추가되거나 저장되거나 어디로도 전송되지 않습니다.
미리보기
아직 필요: Class under test
Write a JUnit 5 test class for the Java class below.
Assertion style: AssertJ
Use Mockito for collaborators: yes
Rules:
- One behavior per test; name tests as should_<behavior>_when_<condition>.
- Cover the happy path, boundary values, null/empty input, and each exception path.
- Do not test private methods directly and do not assert on implementation details.
- Prefer small inline fixtures over shared mutable state.
- After the code, list behaviors you deliberately did NOT test and why.
Collaborators:
Class under test:
```java
{{classUnderTest}}
```
목적
Draft a first, reviewable test class so you start from a solid skeleton instead of a blank file.
사용 시점
- A class has little or no coverage and you need a starting point.
- You want edge cases you might not think of listed explicitly.
준비할 것
- The class under test and the signatures of its direct collaborators.
- Your assertion library preference.
예상 출력
A single compilable Java test class in one code block, followed by a short "Not covered" list.
이 카탈로그 정보
내장 스냅샷 · 2026. 11. 15. 오전 6:05에 게시됨 · 카탈로그 리비전 5bc079fe355af2214bc0
앱에 내장된 스냅샷을 표시하고 있습니다(콘텐츠 소스가 설정되지 않았습니다). 소스에는 더 새로운 콘텐츠가 있을 수 있습니다.