Agent skill

Unit Test Mapper Converter

by giuseppe-trisciuoglio in giuseppe-trisciuoglio/developer-kit

Provides patterns for unit testing mappers, converters, and bean mappings.

MITAuto-check: notesTesting & QA

Install Unit Test Mapper Converter

skills CLI
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-mapper-converter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install giuseppe-trisciuoglio/developer-kit unit-test-mapper-converter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/developer-kit-java/skills/unit-test-mapper-converter .claude/skills/unit-test-mapper-converter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unit-test-mapper-converter
GitHub stars
357
Token cost
~1.2k tokens
SKILL.md length
374 words
Files
2 (incl. references)
Skills in repo
115
Repo updated
First seen
Licence
MIT

At a glance

Provides patterns for unit testing mappers, converters, and bean mappings.

  • Works in 6 steps: Validate Generated Mapper Classes → Test Null Handling → Test Bidirectional Mapping → …
  • Writing mapping tests
  • SKILL.md covers Overview, When to Use, Instructions and Best Practices, plus 2 more sections
  • Calls mvn

What it does

Unit Test Mapper Converter is an agent skill from giuseppe-trisciuoglio/developer-kit. Provides patterns for unit testing mappers, converters, and bean mappings. Validates entity-to-DTO and model transformation logic in isolation. Generates executable mapping tests with MapStruct and custom converter test coverage. Use when writing mapping tests, converter tests, entity mapping tests, or ensuring correct data transformation between DTOs and domain objects.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`).

It sits in Testing & QA, covering Unit testing, Test coverage and Data cleaning. The repository describes itself as: Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI. The licence is MIT.

When your agent uses it

  • Writing mapping tests
  • Converter tests
  • Entity mapping tests
  • Ensuring correct data transformation between DTOs and domain objects

Example prompts

  • “Use the unit-test-mapper-converter skill to provide patterns for unit testing mappers, converters, and bean mappings”
  • “/unit-test-mapper-converter”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Bash, Glob, Grep

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Validate Generated Mapper Classes
  2. Test Null Handling
  3. Test Bidirectional Mapping
  4. Test Nested Object Mapping
  5. Test Custom Expressions
  6. Test Enum Mappings

What it can do on your machine

Read from SKILL.md and the folder at commit fe73fb3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • mvn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unit Test Mapper Converter loads about 1.2k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 100 tokens; SKILL.md has 374 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Bash, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from giuseppe-trisciuoglio/developer-kit at commit fe73fb3, republished under its MIT licence (© giuseppe-trisciuoglio). 374 words, ~1,239 tokens.

Download SKILL.mdSave it as .claude/skills/unit-test-mapper-converter/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
unit-test-mapper-converter
description
Provides patterns for unit testing mappers, converters, and bean mappings. Validates entity-to-DTO and model transformation logic in isolation. Generates executable mapping tests with MapStruct and custom converter test coverage. Use when writing mapping tests, converter tests, entity mapping tests, or ensuring correct data transformation between DTOs and domain objects.
allowed-tools
Read, Write, Bash, Glob, Grep

Unit Testing Mappers and Converters

Overview

Provides patterns for unit testing MapStruct mappers and custom converter classes. Covers field mapping accuracy, null handling, type conversions, nested object transformations, bidirectional mapping, enum mapping, and partial updates.

When to Use

  • Writing mapping tests for MapStruct mapper implementations
  • Testing custom entity-to-DTO converters and bean mappings
  • Validating nested object mapping and collection transformations

Instructions

1. Validate Generated Mapper Classes

Before testing, verify generated mapper classes exist:

bash
# Maven
ls target/generated-sources/

# Gradle
ls build/generated/sources/

If generated classes are missing:

  1. Run mvn compile (Maven) or ./gradlew compileJava (Gradle)
  2. Check that the MapStruct annotation processor is configured
  3. Verify @Mapper interfaces are in a compiled source set
2. Test Null Handling
java
assertThat(mapper.toDto(null)).isNull();

Configure nullValueMappingStrategy in mapper if null should return empty/default.

If null tests fail:

  1. Add nullValueMappingStrategy = NullValueMappingStrategy.RETURN_NULL to @Mapper
  2. Or use nullValuePropertyMappingStrategy for nested property handling
3. Test Bidirectional Mapping
java
User restored = mapper.toEntity(mapper.toDto(original));
assertThat(restored).usingRecursiveComparison().isEqualTo(original);

If bidirectional tests fail:

  1. Check @Mapping annotations for field name mismatches
  2. Verify both directions are explicitly mapped if auto-mapping fails
  3. Use unmappedTargetPolicy = ReportingPolicy.ERROR to catch missing mappings
4. Test Nested Object Mapping
java
assertThat(dto.getNested()).usingRecursiveComparison().isEqualTo(expected);

If nested tests fail:

  1. Ensure nested mapper exists or is referenced via uses = NestedMapper.class
  2. Check collection element mappings with elementMappingStrategy
5. Test Custom Expressions

Custom expressions in @Mapping(target = "field", expression = "java(...)") are not compile-time validated.

If expression tests fail:

  1. Verify the expression syntax and method signatures
  2. Check that imported classes are accessible from the expression context
Show full SKILL.md (139 more words)Show less
6. Test Enum Mappings

Use @ValueMapping for enum-to-enum translations. Test all enum values exhaustively.

Best Practices

  • Use Mappers.getMapper() for standalone tests, Spring injection for integration tests
  • Use usingRecursiveComparison() for complex nested structures
  • Test all mapper methods including collection transformations
  • Verify null handling for all nullable source fields
  • Test bidirectional mapping catches asymmetries between entity→DTO and DTO→entity
  • Keep mapper tests focused on transformation correctness, not implementation details

Constraints and Warnings

  • Compile-time generation: MapStruct generates code at compile time—verify generated classes exist before running tests
  • Null handling: Configure nullValueMappingStrategy and nullValuePropertyMappingStrategy appropriately
  • Expression validation: Expressions in @Mapping are not validated at compile time—test them explicitly
  • Circular dependencies: MapStruct cannot handle circular dependencies between mappers
  • Collection immutability: Mapping immutable collections may require special configuration
  • Date/Time: Verify date/time objects map correctly across timezones

Examples

Complete executable test with imports:

java
package com.example.mapper;

import org.junit.jupiter.api.Test;
import org.mapstruct.factory.Mappers;
import static org.assertj.core.api.Assertions.*;

class UserMapperCompleteTest {
  private final UserMapper mapper = Mappers.getMapper(UserMapper.class);

  @Test
  void shouldMapUserToDto() {
    User user = new User(1L, "Alice", "alice@example.com", 25);
    UserDto dto = mapper.toDto(user);
    assertThat(dto)
      .isNotNull()
      .extracting(UserDto::getName, UserDto::getEmail)
      .containsExactly("Alice", "alice@example.com");
  }

  @Test
  void shouldMaintainRoundTrip() {
    User original = new User(1L, "Alice", "alice@example.com", 25);
    assertThat(mapper.toEntity(mapper.toDto(original)))
      .usingRecursiveComparison()
      .isEqualTo(original);
  }

  @Test
  void shouldHandleNullInput() {
    assertThat(mapper.toDto(null)).isNull();
  }
}

Additional examples in: references/examples.md

© giuseppe-trisciuoglio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/developer-kit-java/skills/unit-test-mapper-converter of giuseppe-trisciuoglio/developer-kit.

  • SKILL.md
  • references/examples.md

Open the folder on GitHubat commit fe73fb3

Compare with similar skills

Unit Test Mapper Converter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unit Test Mapper Converter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unit Test Mapper Converter this skillgiuseppe-trisciuoglio/developer-kit357—~1.2kAutomated safety check: NotesMIT
Atdd Mutateswingerman/engineer154—~2.7kAutomated safety check: PassMIT
Test Writerhamzafarooq/claude-code-starter145—~345Automated safety check: PassMIT
Memstack Development Test Writercwinvestments/memstack423—~3.7kAutomated safety check: PassProprietary
Test Coverageluongnv89/skills131—~3.2kAutomated safety check: PassMIT
Post Dev Testsd0xdev/sd0x-harness192—~1.8kAutomated safety check: NotesMIT

Similar skills

  • Atdd Mutate

    swingerman/engineer

    A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

    154 GitHub stars~2.7k tokensUpdated 18 days ago
    Testing & QAAuto-check passed
  • Test Writer

    hamzafarooq/claude-code-starter

    Write unit tests for any function — happy path, edge cases, and error cases.

    145 GitHub stars~345 tokensUpdated 27 days ago
    Testing & QAAuto-check passed
  • Memstack Development Test Writer

    cwinvestments/memstack

    A skill your agent uses when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with…

    423 GitHub stars~3.7k tokensUpdated 14 days ago
    Testing & QAAuto-check passed
  • Test Coverage

    luongnv89/skills

    Generate unit tests for untested branches and edge cases. An agent skill from luongnv89/skills.

    131 GitHub stars~3.2k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Post Dev Test

    sd0xdev/sd0x-harness

    Post-development test completion. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.8k tokensUpdated 3 days ago
    Testing & QAAuto-check: notes
  • Test Suite Curation

    petrkindlmann/qa-skills

    Audit a whole regression suite and prune/restructure it with evidence: per-test coverage fingerprinting, AST near-duplicate clustering, CI-history mining for never-failing and flaky tests, prune…

    170 GitHub stars~6.3k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed

More from giuseppe-trisciuoglio/developer-kit

All 115 skills in this repo
  • Nestjs Drizzle Crud Generator

    giuseppe-trisciuoglio/developer-kit

    Generates complete CRUD modules for NestJS applications with Drizzle ORM.

    357 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check: notes
  • Spring Boot Actuator

    giuseppe-trisciuoglio/developer-kit

    Provides patterns to configure Spring Boot Actuator for production-grade monitoring, health probes, secured management endpoints, and Micrometer metrics across JVM services.

    357 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check: notes
  • Spring Boot Crud Patterns

    giuseppe-trisciuoglio/developer-kit

    Provides and generates complete CRUD workflows for Spring Boot 3 services.

    357 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check: notes
  • Spring Boot Security JWT

    giuseppe-trisciuoglio/developer-kit

    Provides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based…

    357 GitHub stars~3.9k tokensUpdated 1 mo ago
    Auto-check: notes
  • AWS CLI Beast

    giuseppe-trisciuoglio/developer-kit

    Provides advanced AWS CLI patterns for managing EC2, Lambda, S3, DynamoDB, RDS, VPC, IAM, and CloudWatch.

    357 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check: notes
  • PR Review Comments

    giuseppe-trisciuoglio/developer-kit

    Posts review findings from a JSON file as inline comments on a GitHub Pull Request, attaching each comment to its file and line.

    357 GitHub stars~1k tokensUpdated 1 mo ago
    Auto-check: notes

Categories

Questions about Unit Test Mapper Converter

What does Unit Test Mapper Converter do?

Provides patterns for unit testing mappers, converters, and bean mappings. Unit Test Mapper Converter is an agent skill from giuseppe-trisciuoglio/developer-kit. Provides patterns for unit testing mappers, converters, and bean mappings.

When should I use Unit Test Mapper Converter?

Unit Test Mapper Converter fits situations like: writing mapping tests; converter tests; entity mapping tests; ensuring correct data transformation between DTOs and domain objects.

How do I install Unit Test Mapper Converter in Claude Code?

Run `npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-mapper-converter -a claude-code`. Or copy the skill folder (plugins/developer-kit-java/skills/unit-test-mapper-converter in giuseppe-trisciuoglio/developer-kit) into .claude/skills/unit-test-mapper-converter in your project. Claude Code loads it when a task matches its description.

How do I install Unit Test Mapper Converter in Codex?

Run `npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-mapper-converter -a codex`. Or copy the skill folder (plugins/developer-kit-java/skills/unit-test-mapper-converter in giuseppe-trisciuoglio/developer-kit) into .agents/skills/unit-test-mapper-converter in your project. Codex loads it when a task matches its description.

Can I use Unit Test Mapper Converter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-mapper-converter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unit-test-mapper-converter, .gemini/skills/unit-test-mapper-converter, .github/skills/unit-test-mapper-converter and .opencode/skills/unit-test-mapper-converter in your project.

What does Unit Test Mapper Converter need to run?

Going by SKILL.md and its folder, Unit Test Mapper Converter needs the command-line tools its instructions call (mvn). Its frontmatter pre-approves these tools: Read, Write, Bash, Glob, Grep.

Does Unit Test Mapper Converter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Unit Test Mapper Converter safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Unit Test Mapper Converter use?

Unit Test Mapper Converter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unit Test Mapper Converter use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Unit Test Mapper Converter?

Skills that share tags, products or a category with Unit Test Mapper Converter: Atdd Mutate (swingerman/engineer, 154 stars), Test Writer (hamzafarooq/claude-code-starter, 145 stars), Memstack Development Test Writer (cwinvestments/memstack, 423 stars) and Test Coverage (luongnv89/skills, 131 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unit Test Mapper Converter?

giuseppe-trisciuoglio (a GitHub user) maintains it in giuseppe-trisciuoglio/developer-kit, which has 357 GitHub stars. The repository holds 115 skills in this directory. The repository was last updated on September 10, 2026.

Source: giuseppe-trisciuoglio/developer-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.