New advertisers: 50% off your first month with code FIRSTMONTHSee slots
giuseppe-trisciuoglio avatar

Unit Test Utility Methods

Unit tests for utility classes covering null, empty, boundary, and precision cases, using AssertJ and parameterized tests.

skills.sh installs
3.9K
GitHub stars
372
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers pure static helpers across string, math, validator, collection, and clock-dependent utilities, with no mocking needed for pure functions
  • Includes example test classes for StringUtils, MathUtils, CollectionUtils, ValidatorUtils, and DateUtils, plus references/parameterized-tests.md and references/edge-cases.md
  • Enforces AssertJ isCloseTo for floating-point results and warns against exact equality checks on doubles
  • Designed for Java projects using JUnit 5 that need readable tests for helper and validation code

Install

$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-utility-methods -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Unit Testing Utility Classes and Static Methods

Overview

This skill generates tests for utility classes with static helper methods and pure functions. It provides patterns for testing null handling, edge cases, boundary conditions, and common utilities like string manipulation, calculations, data validation, and collections. Pure functions require no mocking.

When to Use

Use this skill when:

  • Writing tests for utility/helper classes with static methods
  • Testing pure functions with no state or side effects
  • Testing string manipulation, formatting, or transformation utilities
  • Testing calculation, conversion, or math helper functions
  • Testing data validation and formatter utilities
  • Verifying null/empty input handling in utility code
  • Testing collections or array helper methods

Instructions

Details

Repository
github.com/giuseppe-trisciuoglio/developer-kit
Categories
Testing & QA, Java & JVM
First seen
May 16, 2026

More from giuseppe-trisciuoglio/developer-kit

All 95

Similar to Unit Test Utility Methods

More Testing & QA