
Test Quality
This skill enforces modern Java testing practices with JUnit 5 and AssertJ assertions instead of old-school JUnit assertions. It activates when you say "add tests" or "improve test coverage" and pushes you toward readable patterns like the AAA structure, descriptive @DisplayName annotations, and AssertJ's fluent chains that actually tell you what failed. The source shows good taste: nested test classes for organization, extracting() for collection verification, and soft assertions when you need multiple checks. It steers you away from assertEquals toward assertThat() with clear failure messages. If you're still writing assertTrue and basic JUnit assertions, this will modernize your test style fast.
- skills.sh installs
- 336
- GitHub stars
- 771
- last updated
- Feb 8, 2026
Install
$ npx -y skills add decebals/claude-code-java --skill test-quality --agent claude-codeInstalls into .claude/skills of the current project.
Files
Test Quality Skill (JUnit 5 + AssertJ)
Write high-quality, maintainable tests for Java projects using modern best practices.
When to Use
- Writing new test classes
- Reviewing/improving existing tests
- User asks to "add tests" / "improve test coverage"
- Code review mentions missing tests
Framework Preferences
JUnit 5 (Jupiter)
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import static org.assertj.core.api.Assertions.*;
AssertJ over standard assertions
✅ Use AssertJ:
assertThat(plugin.getState())
.as("Plugin should be started after initialization")
.isEqualTo(PluginState.STARTED);
assertThat(plugins)
.hasSize(3)
.extracting(Plugin::getId)
.containsExactly("plugin1", "plugin2", "plugin3");
❌ Avoid JUnit assertions:
assertEquals(PluginState.STARTED, plugin.getState()); // Less readable
assertTrue(plugins.size() == 3); // Less descriptive failures
Test Structure (AAA Pattern)
Always use Arrange-Act-Assert pattern:
Sponsors
Details
- Repository
- github.com/decebals/claude-code-java
- Categories
- Testing & QA, Code Review & Quality, Java & JVM
- License
- MIT
- First seen
- Jun 11, 2026
More from decebals/claude-code-java
All 18- Api Contract Review315
- Maven Dependency Audit308
- Logging Patterns300
- Jpa Patterns297
- Changelog Generator251
- Git Commit249
- Issue Triage240
- Java Code Review1.1K
- Clean Code427
- Concurrency Review384
- Solid Principles384
- Architecture Review374
- Design Patterns372
- Spring Boot Patterns358
- Java Migration357
- Security Audit347
- Performance Smell Detection341