Skip to content

test: raise mutation coverage above the nightly PIT gate - #34

Merged
emaarco merged 1 commit into
mainfrom
emaarco/port-zeebe-coverage-tests
Aug 22, 2026
Merged

test: raise mutation coverage above the nightly PIT gate#34
emaarco merged 1 commit into
mainfrom
emaarco/port-zeebe-coverage-tests

Conversation

@emaarco

@emaarco emaarco commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Why

Keeps this blueprint in lock-step with its siblings. The Zeebe blueprint added tests to close coverage gaps around value objects, DTOs, the persistence mapper, exceptions and services (miragon-blueprints/zeebe-example#15). This PR ports the equivalent tests here so the same behaviour is pinned down and the full-module nightly PIT gate (80) stays comfortably above threshold. Purely additive — no production code changes.

What

  • Value objects (CustomerName, Email, ContractId, OrderId, BikeId): value exposure + require() validation
  • LeasingApplicationEntityMapper: direct round-trip incl. nullable order/contract ids
  • ApplicationInvalidException: reason + composed message
  • CancelContractService: unknown-application and no-contract error branches
  • SelectAlternativeController: alternativeFound=false branch
  • LeasingApplication: age / monthlyNetIncome getters

Shared-code tests (domain value objects, exception, application services) were taken 1:1 from the Zeebe PR — same class names, same test methods, same wording. Engine-touching tests (persistence mapper, controllers) were adapted to this repo's CIB seven structure.

Skipped vs #15

  • GetLeasingApplicationController (assert every mapped DTO field): already covered here — the existing test asserts all mapped fields plus a null-order/contract case, so no change was needed.
  • RequestOrderCancellationService (false return path): already present in this repo.

Result

Affected unit tests run green (./gradlew :service:app:test for the touched classes). No production code changed; only tests were added.

Purely additive tests mirroring miragon-blueprints/zeebe-example#15 to keep the
blueprints in lock-step. No production code changes.

- Value objects (CustomerName, Email, ContractId, OrderId, BikeId): value
  exposure + require() validation
- LeasingApplicationEntityMapper: direct round-trip incl. nullable order/contract ids
- ApplicationInvalidException: reason + composed message
- CancelContractService: unknown-application and no-contract error branches
- SelectAlternativeController: alternativeFound=false branch
- LeasingApplication: age / monthlyNetIncome getters
@emaarco
emaarco merged commit dc543d3 into main Aug 22, 2026
6 checks passed
@emaarco
emaarco deleted the emaarco/port-zeebe-coverage-tests branch August 22, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant