{"enrichment":{"faq":[{"a":"Test Quality helps you write JUnit 5 tests using the Arrange-Act-Assert pattern. Start by organizing your test class with @Test methods, set up your test data in the arrange phase, execute the code being tested in the act phase, and verify results using AssertJ assertions in the assert phase. Test Quality covers structuring tests with nested classes for better organization and using parameterized tests to reduce duplication.","q":"How do I write JUnit 5 tests for Java?"},{"a":"Test Quality explains that AssertJ provides a fluent, chainable API with more readable assertions than JUnit's built-in methods. AssertJ offers richer matchers for collections, strings, and exceptions, supports soft assertions to check multiple conditions without stopping on first failure, and delivers clearer error messages. This makes AssertJ ideal for writing high-quality, maintainable tests that are easier to debug.","q":"What are the key differences between AssertJ and JUnit assertions?"},{"a":"Test Quality guides you through AssertJ's fluent syntax for common scenarios: use assertThat() with chainable methods like isEqualTo(), contains(), and hasSize() for collections. For strings, leverage startsWith(), endsWith(), and matches(). AssertJ also supports soft assertions via SoftAssertions class to verify multiple conditions, and specialized methods like assertThatThrownBy() for exception testing, all improving test readability and maintainability.","q":"How to use AssertJ assertions effectively in tests?"},{"a":"Test Quality recommends organizing tests with nested classes using @Nested to group related test cases by behavior or scenario, improving readability and structure. Use @DisplayName for clear test descriptions, @ParameterizedTest with various sources for testing multiple inputs, and the Arrange-Act-Assert pattern consistently. This approach enhances test coverage, makes tests self-documenting, and simplifies maintenance as your test suite grows.","q":"What are JUnit 5 best practices for test organization?"},{"a":"Test Quality teaches you to improve coverage by writing parameterized tests that check multiple scenarios with less code, using nested test classes to organize related tests, and leveraging AssertJ's collection and exception assertions for thorough verification. Focus on testing edge cases, exception handling, and async operations. Regular refactoring of tests using these patterns ensures your test suite remains maintainable and provides genuine value.","q":"How do I improve test coverage and quality in Java projects?"},{"a":"Test Quality covers exception testing using AssertJ's assertThatThrownBy() to verify both exception type and message, and assertThatCode() for code that should not throw. For async operations, use JUnit 5's timeout support with @Timeout annotation and combine it with AssertJ assertions. These techniques ensure your error handling is robust and async code behaves correctly under various conditions.","q":"How can I test exception handling and async operations with JUnit 5?"}],"shadow_tags":["assertion-framework","test-structure","code-coverage","mock-testing","parameterized-tests","exception-handling","test-organization","fluent-api"],"summary_rewrite":"Test Quality guides you through writing maintainable Java tests using JUnit 5 and AssertJ. It covers the Arrange-Act-Assert pattern, collection and exception assertions, nested test organization, and parameterized testing to improve code coverage and test readability."},"files":[{"bytes":15090,"path":".claude/skills/test-quality/SKILL.md","sha256":"66889d2a848976dfb13182e977270d2eed0a5c906d91228efdfe6b979730d554","url":"https://skillfed.io/files/decebals/claude-code-java/test-quality/68d9abf5/SKILL.md"}],"id":"decebals/claude-code-java/test-quality","links":{"html":"https://skillfed.io/decebals/claude-code-java/test-quality","md":"https://skillfed.io/decebals/claude-code-java/test-quality.md","repo":"https://github.com/decebals/claude-code-java"},"meta":{"agents_supported":["claude-code"],"first_seen":"2026-07-28","forks":135,"language":"Shell","last_updated":"2026-02-08","license":"MIT","name":"test-quality","publisher":"decebals","stars":693},"relations":{"similar":[{"id":"affaan-m/ECC/quarkus-tdd"},{"id":"pluginagentmarketplace/custom-plugin-java/java-testing"},{"id":"giuseppe-trisciuoglio/developer-kit/unit-test-utility-methods"},{"id":"giuseppe-trisciuoglio/developer-kit/unit-test-boundary-conditions"},{"id":"giuseppe-trisciuoglio/developer-kit/unit-test-config-properties"},{"id":"dawiddutoit/custom-claude/java-test-generator"},{"id":"personamanagmentlayer/pcl/java-expert"},{"id":"giuseppe-trisciuoglio/developer-kit/unit-test-mapper-converter"},{"id":"softspark/ai-toolkit/java-patterns"},{"id":"dawiddutoit/custom-claude/python-test-micrometer-testing-metrics"}]},"slug":{"owner":"decebals","repo":"claude-code-java","skill":"test-quality"},"version":"68d9abf5"}
