From b1e75230c9116a6afddc2140a21db0d3aaf6293d Mon Sep 17 00:00:00 2001 From: Sebastian Kern Date: Sun, 2 Aug 2026 10:47:03 +0200 Subject: [PATCH 1/3] =?UTF-8?q?docs(g6):=20amendment=20A2=20=E2=80=94=20th?= =?UTF-8?q?e=20four=20Phase-B=20method=20decisions,=20pre-registered?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase A is published, Phase B has not started. PROTOCOL.md §6 fixed WHAT is repaired, the 30-minute cap and the six categories, but left four operational questions open — and each of them changes what the repair-effort number means. Deciding them in the executing session instead of here would have been exactly the post-hoc curation this protocol exists to prevent. - A2.1 parallel, mutually blind repairers, one agent instance per cell: a serial repairer accumulates familiarity, so cell ORDER becomes a hidden variable. Cost stated, not hidden: the numbers are per-cell COLD-START effort, an upper bound on one cell in isolation, never a batch estimate for a human team. - A2.2 repair may only repair — no test method the model did not write. Without this Phase B measures the repairer, not the generator. - A2.3 a cell whose recorded output is `null` is ABANDONED at 0 minutes, and the report must not average it in: zero-because-unrepairable is not a cheap cell. - A2.4 truncated output is salvaged (keep complete methods, drop the tail), never completed. Nothing is re-run, re-prompted or re-recorded; no Phase-A number changes. Harness 24/24 green after the edit (the prompt-drift test reads §4, untouched). Co-Authored-By: Claude Opus 5 (1M context) --- ai-testgen/PROTOCOL.md | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/ai-testgen/PROTOCOL.md b/ai-testgen/PROTOCOL.md index 79e797f..82f89b0 100644 --- a/ai-testgen/PROTOCOL.md +++ b/ai-testgen/PROTOCOL.md @@ -352,3 +352,62 @@ had not executed when it was made. **Reading rule this forces on the report:** a `finish_reason=length` cell must be reported as *"no answer was produced within the pinned output budget"*, never as *"the model produced broken code"*. They are different findings and only one of them is about the model. + +### A2 — 2026-08-02, before Phase B, for Phase B + +Phase A is measured and published; Phase B has not started. §6 fixes *what* is repaired, the +30-minute cap, and the six categories, but four operational questions were left open in the +frozen text, and each of them changes what the repair-effort number means. They are decided +here, **before the first repair**, rather than settled by whatever the executing session +happened to do. + +**A2.1 — Phase B runs as parallel, mutually blind repairers: one agent instance per cell.** +Each of the cells that needs repair is handed to its own Claude Code agent instance with its +own working tree, its own wall clock, and **no knowledge of any other cell** — not the +generated code, not the diagnosis, not the fix. The alternative, one agent walking the cells +in sequence, was rejected because it destroys the metric: by cell 9 the repairer has seen the +same missing-import cluster eight times, so its effort figure measures accumulated familiarity +and the cell *order* silently becomes a variable. This is the same reason the generation step +ran at k = 1 with a fixed order rather than in a conversation. + +What this buys: cells become independent and directly comparable, and the M1-vs-M2 repair +comparison (RQ3/RQ4) is not confounded by whichever arm happened to be repaired first. + +What it costs, stated because it is a real limitation and not a footnote: **a human team does +not work this way.** A developer repairing six near-identical import failures gets faster, and +that learning is genuine, transferable economics this design deliberately removes. The +Phase-B numbers are therefore **per-cell cold-start effort** — an upper bound on the marginal +cost of one cell in isolation, not an estimate of the total cost of repairing a batch. The +report must say so at the point of the number. T4 (single rater) is unchanged in kind but now +reads "single rater *policy*, N independent instances"; T8 (repairer is same-family as M1) is +untouched and still applies to every cell. + +**A2.2 — Repair may only repair. It may not add tests.** +The repairer fixes what the model produced: imports, syntax, mock setup, wrong expectations, +unusable structure. It must **not** add a test method the model did not write, must not extend +an existing test to cover a new branch, and must not touch the class under test (already fixed +in §2). Without this rule Phase B silently becomes "an AI agent writes tests, warm-started by +a draft", and the coverage and mutation deltas would measure the repairer instead of the +generator. Deleting a test method is allowed only under A2.4 and is counted. + +**A2.3 — A cell whose recorded output contains no code is `ABANDONED` at 0 minutes.** +Three cells hit the pinned output budget (A1); in two of them — arm M1 on S1, both corpora — +the recorded artifact is the literal string `null`, because the whole budget went into +reasoning tokens. There is nothing to repair. Writing a test class for those cells from +scratch would be the repairer generating tests, which is the one thing Phase B is not, so +they are recorded as `ABANDONED` with **0 repair minutes and no fix-log rows**, and they stay +`NO_CODE` after repair. The honest reading — and the report must carry it — is that +**`ABANDONED`-at-zero is not a cheap cell, it is an unrepairable one**; averaging it into a +repair-minutes mean would make the total look better the more completely a model failed. +Repair effort is therefore always reported alongside the count of cells it was computed on. + +**A2.4 — Truncated output is salvaged, not completed.** +One cell (M2, corpus B, `AuftragController`) stopped mid-method with `finish_reason=length` +after a visibly degenerating test-method name. It contains real, complete test methods before +the cut. The rule: **keep every syntactically complete method up to the truncation point, +delete the incomplete tail, close the class** — category `IMPORT/SYNTAX`, and the number of +dropped methods recorded in the fix log and the report. Nothing is written to replace them +(A2.2). Salvage is repair; finishing the model's sentence would not be. + +**Nothing in A2 re-runs, re-prompts or re-records any generation call**, and no Phase-A number +changes. All four decisions concern only steps that had not executed when this was written. From eb7b6cc372148ae05664ade169d6caf9f1f9b8f5 Mon Sep 17 00:00:00 2001 From: Sebastian Kern Date: Sun, 2 Aug 2026 11:15:24 +0200 Subject: [PATCH 2/3] docs: write the missing docs/deployment.md + a manual-task checklist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ENGINEERING_STANDARDS §7 has required `docs/deployment.md` since the standard was written. The file did not exist — and the gap was not in DEVIATIONS.md either, which is worse: the ledger's whole purpose is that there are no silent holes. It was found by a doc audit, not by the ledger. Both halves are now closed. New: - `docs/deployment.md` — prerequisites per module (the JDK matrix existed nowhere as a table), first run, both stands, the database, every suite, reproducing CI, troubleshooting. Every command in it was executed against this repo before being written down. §10 states plainly that production deployment does NOT exist and invents no steps for it. - `docs/MANUAL_TASKS.md` — the human-only steps as checklists: once per machine, per session, per PR, per stage, GitHub admin, the API key, golden re-capture. Beginner-fatal defects fixed, all verified rather than assumed: - **`--wait` was missing from every human-facing quickstart** while all three CI workflows have always used it. Copy-paste the docs and the next suite run hits a stand that is up but not healthy, failing on timing in a way that reads like a test bug. Fixed in README, CLAUDE.md and all four module READMEs. - **characterization silently ignored `-Dtarget`.** `-Dtarget=modern` went GREEN against the LEGACY stand — an equivalence proof that proved nothing. A net that can be aimed at the wrong stand without saying so is not a net, so it now fails fast with the three flags it actually needs. Verified: guard fires, normal runs stay green. - **`./mvnw verify -f modern/pom.xml` needs a running Docker daemon** (Testcontainers) and nothing said so. - characterization README started only the legacy stand, then targeted the modern one. - `legacy/` build failure explained correctly for the first time: measured on JDK 26, `compile` and `surefire` SUCCEED — it dies in `maven-war-plugin:2.6`, which reflects into `java.util` internals JDK 16 sealed. It was never the Java 8 source level. That is the project's thesis in miniature: the blocker is the build plugins. - `modern/frontend/README.md` was unedited CLI boilerplate telling you to run `ng test` with Vitest — neither is installed. Rewritten, and the absence of frontend unit tests is now stated as a position rather than left to be discovered. - stale: "module tests arrive with G6" (they exist since 2026-07-31) in CLAUDE.md, SPEC and modern-ci; SPEC's "three workflows" (there are four, supplying three of the seven required checks); the selector-map comment claiming the Angular Testability API (the app is zoneless — Testability observes nothing); `.env.example`'s cost estimate (€1.20–1.50 estimated vs €0.65 actually spent). Grounded in official Docker, Adoptium/Maven, Selenium, PostgreSQL, GitHub and npm/OpenRouter documentation; claims those sources could not confirm were dropped rather than filled in from memory. Co-Authored-By: Claude Opus 5 (1M context) --- .env.example | 2 +- .github/workflows/modern-ci.yml | 2 +- .gitignore | 3 + CLAUDE.md | 11 +- README.md | 13 +- ai-testgen/PROTOCOL.md | 45 ++ ai-testgen/README.md | 5 + characterization/README.md | 18 +- .../migrationlab/characterization/Stand.java | 25 +- docs/DEVIATIONS.md | 2 + docs/MANUAL_TASKS.md | 165 +++++ docs/SPEC.md | 4 +- docs/deployment.md | 588 ++++++++++++++++++ e2e/README.md | 15 +- .../resources/selectors/legacy.properties | 7 +- legacy/README.md | 42 +- modern/README.md | 9 +- modern/frontend/README.md | 81 +-- 18 files changed, 973 insertions(+), 64 deletions(-) create mode 100644 docs/MANUAL_TASKS.md create mode 100644 docs/deployment.md diff --git a/.env.example b/.env.example index f133da2..541570d 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,7 @@ # --- G6 ai-testgen (required only when executing the frozen PROTOCOL.md) --- # Create at https://openrouter.ai/keys. Copy this file to .env (git-ignored) and fill # it in — the harness reads .env by itself, so the key never has to enter shell history. -# The experiment costs roughly EUR 1.20-1.50 in total; the harness hard-aborts at EUR 20. +# The full executed run (24 calls, 2026-07-31) cost EUR 0.65; the harness hard-aborts at EUR 20. OPENROUTER_API_KEY= # --- G7 deployment (Hetzner + Dokploy; filled at G7, see docs/MILESTONES.md) --- diff --git a/.github/workflows/modern-ci.yml b/.github/workflows/modern-ci.yml index d3be939..31e562a 100644 --- a/.github/workflows/modern-ci.yml +++ b/.github/workflows/modern-ci.yml @@ -1,6 +1,6 @@ # Modern stand: build, then the EQUIVALENCE GATE — the same characterization # suite that locks the legacy behaviour runs against the modern stand -# (module unit/integration tests arrive with G6, see docs/DEVIATIONS.md). +# (module unit/integration tests exist since 2026-07-31: ArchUnit + Testcontainers). # Functional equivalence is proven per commit, not claimed (ADR-0004). # All steps run UNCONDITIONALLY (ADR-0008): presence gates are retired. name: modern-ci diff --git a/.gitignore b/.gitignore index 20efbef..6f51f58 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,6 @@ Thumbs.db !ai-testgen/runs/**/*.log hs_err_pid* .playwright-mcp/ + +# Claude Code scratch: agent worktrees created during a session (transient) +.claude/worktrees/ diff --git a/CLAUDE.md b/CLAUDE.md index 768d4e1..e43d518 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,9 +31,13 @@ You are working on **migration-lab**: a public, reproducible legacy modernizatio - Conventional Commits; tags and `stages.md` updated in the same PR as the stage completion. ## Commands (keep current as the repo grows) +Full operations reference: `docs/deployment.md`. Human-only steps: `docs/MANUAL_TASKS.md`. + ```bash -docker compose -f legacy/docker-compose.yml up -d # legacy stand (8080, db 127.0.0.1:5433) -docker compose -f modern/docker-compose.yml up -d # modern stand (8090, db 127.0.0.1:5434; exists since stage 2) +# --wait is not optional: without it the containers are running but not yet healthy, +# and the next suite fails on timing rather than on behaviour. +docker compose -f legacy/docker-compose.yml up -d --wait # legacy stand (8080, db 127.0.0.1:5433) +docker compose -f modern/docker-compose.yml up -d --wait # modern stand (8090, db 127.0.0.1:5434; since stage 2) # suites (stands must be up; both suites fail loudly if zero tests are discovered) ./mvnw verify -f characterization/pom.xml # characterization vs legacy @@ -45,5 +49,6 @@ docker compose -f modern/docker-compose.yml up -d # modern stand (8090, db 12 # a bare `./mvnw -f legacy/pom.xml` fails on a modern local JDK (legacy/README.md). # modern verify builds the Angular frontend too (frontend-maven-plugin installs its # own Node, npm ci) and runs the lint/format gates (Spotless, ng lint, prettier). -./mvnw verify -f modern/pom.xml # modern build (module tests arrive with G6) +./mvnw verify -f modern/pom.xml # modern build — NEEDS A RUNNING DOCKER DAEMON + # (Testcontainers); 11 module tests since G6 ``` diff --git a/README.md b/README.md index 4c83ed0..f37a71e 100644 --- a/README.md +++ b/README.md @@ -100,13 +100,22 @@ changes how the numbers transfer: ## Quickstart +Needs only Docker with the Compose plugin — the applications build inside Docker. + ```bash -docker compose -f legacy/docker-compose.yml up -d +docker compose -f legacy/docker-compose.yml up -d --wait # SPA: http://localhost:8080 · JSP admin: http://localhost:8080/admin -docker compose -f modern/docker-compose.yml up -d +docker compose -f modern/docker-compose.yml up -d --wait # modern stand: http://localhost:8090 ``` +`--wait` blocks until the healthchecks pass. Without it the containers are merely *running* — +PostgreSQL is not yet accepting connections, and the next test run fails on timing. + +Everything else — prerequisites per module, running the suites, resetting the database, +troubleshooting — is in [`docs/deployment.md`](docs/deployment.md). The by-hand steps are +checklisted in [`docs/MANUAL_TASKS.md`](docs/MANUAL_TASKS.md). + --- ## Deutsche Kurzfassung diff --git a/ai-testgen/PROTOCOL.md b/ai-testgen/PROTOCOL.md index 82f89b0..ffd956c 100644 --- a/ai-testgen/PROTOCOL.md +++ b/ai-testgen/PROTOCOL.md @@ -411,3 +411,48 @@ dropped methods recorded in the fix log and the report. Nothing is written to re **Nothing in A2 re-runs, re-prompts or re-records any generation call**, and no Phase-A number changes. All four decisions concern only steps that had not executed when this was written. + +### A3 — 2026-08-02, during Phase B: a disclosure, not a change + +**This entry changes no rule, no number and no artifact.** It records something found while +repairing, which the §8 threat list did not anticipate. It is deliberately **not** added to §8: +§8 is headed *pre-declared*, and a threat discovered after the measurement does not get to +borrow the credibility of pre-registration. It is a weaker kind of finding and is labelled as +one here and in `REPORT.md`. + +**What was found.** In exactly one cell — arm M1, corpus A, S4 `Rechnung` — the model's reply +contains **two** ```` ```java ```` blocks. The first is an empty class body carrying a malformed +static import (`org.assertj.org.assertj.core.api`). Between the two blocks the model writes, in +plain text: *"Wait, I need to produce the correct final answer without mistakes. Let me redo it +properly."* The second block is a complete test class with 26 test methods and the **correct** +import. `finish_reason` is `stop`: the model finished, and its final answer was the good one. + +The extraction rule of §5 takes the **first** fenced block. It therefore recorded the model's +abandoned false start and discarded its actual answer. + +**Consequence for how Phase A must be read.** The `REPORT.md` failure-taxonomy row that +attributed a "malformed import" to arm M1 on S4/A describes *the extracted artifact* correctly +and *the model's output* incorrectly. **In that cell the pipeline, not the model, produced the +failure.** The report is corrected to say so, with the raw response cited. + +**What does NOT change, and why.** The extraction rule was pre-registered, applied mechanically, +and the recorded result is what this protocol produces. **The cell is not re-extracted, not +re-run, and the 12/24 Phase-A compile rate stands as measured.** Re-reading an artifact more +favourably *after seeing that it hurt a number* is precisely the failure mode the pre-registration +exists to prevent — the rule does not become wrong just because it cost us a data point. The +counterfactual ("13/24 under a last-block rule") is stated in the report as a counterfactual, +clearly separated from the measured value, because the size of a harness effect is itself a +result worth publishing. + +**Scope, checked rather than assumed.** All 24 responses were scanned for multiple fenced +blocks before this was written. **One cell is affected; the other 23 contain exactly one block** +(two contain none — the `finish_reason=length` cells of A1). So this is a bounded defect in one +cell, not a systematic bias — and that bound is itself the reason it can be reported calmly. + +**For replications, the transferable lesson:** *"first fenced code block" is not a neutral +reading of a model's answer.* A model that self-corrects mid-reply is normal behaviour, and any +extraction rule silently decides which of its drafts gets benchmarked. A replication should +pre-register the rule it wants (first block / last block / longest block / all blocks +concatenated) **and** publish how many cells the choice actually moved. Ours moved one in +twenty-four — roughly four percentage points of the headline compile rate, from a line of code +nobody would have thought to argue about. diff --git a/ai-testgen/README.md b/ai-testgen/README.md index 969c321..8bdaf59 100644 --- a/ai-testgen/README.md +++ b/ai-testgen/README.md @@ -27,6 +27,11 @@ any of its four cells. ## Running it +Prerequisites beyond a JDK 25+: `measure.sh` is a bash script that needs **`python3`** (it parses +the JaCoCo and PIT XML) and **`column`** from util-linux. It does **not** validate its `phase` +argument — a typo produces `skip : no / directory` for all six units and a +header-only CSV that looks exactly like a completed measurement. Check the row count. + ```bash # what would run, and what it has cost so far — no key needed ./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java -Dexec.args="plan" diff --git a/characterization/README.md b/characterization/README.md index f7e5483..611294d 100644 --- a/characterization/README.md +++ b/characterization/README.md @@ -35,18 +35,30 @@ Three suites (Java 25, JUnit 5, no framework beyond JDK http + Jackson + JDBC): ## Run ```bash -docker compose -f legacy/docker-compose.yml up -d # stand must be running - # against the legacy stand (defaults) +docker compose -f legacy/docker-compose.yml up -d --wait ./mvnw verify -f characterization/pom.xml -# against the modern stand +# against the modern stand — its own stand, and all THREE flags +docker compose -f modern/docker-compose.yml up -d --wait ./mvnw verify -f characterization/pom.xml \ -DbaseUrl=http://localhost:8090 \ -DdbUrl=jdbc:postgresql://localhost:5434/werkstatt \ -Dstand=modern ``` +`--wait` blocks until the healthchecks pass; without it the suite hits a stand +that is not yet accepting connections and fails on timing rather than on +behaviour. + +> **This suite has no `-Dtarget`.** That flag belongs to `e2e/` only, where it +> switches base URL, DB URL and selector map together. Here there are three +> separate flags and you need all three — `-DbaseUrl` alone tests the modern app +> against the legacy database, `-Dstand=modern` alone tests modern expectations +> against port 8080. Passing `-Dtarget` used to be silently ignored, which +> produced a **green run against the wrong stand**; since 2026-08-02 it fails +> fast instead. + ### The `stand` property — sanctioned divergence (ADR-0004) Every pin must hold identically on both stands — except where a stage diff --git a/characterization/src/test/java/at/stoicera/migrationlab/characterization/Stand.java b/characterization/src/test/java/at/stoicera/migrationlab/characterization/Stand.java index 2eed4f4..545733e 100644 --- a/characterization/src/test/java/at/stoicera/migrationlab/characterization/Stand.java +++ b/characterization/src/test/java/at/stoicera/migrationlab/characterization/Stand.java @@ -35,7 +35,8 @@ public final class Stand { * divergence). Values: "legacy" (default) | "modern". Everything not explicitly forked on this * flag must behave identically on both stands. */ - public static final String STAND = validateStand(System.getProperty("stand", "legacy")); + public static final String STAND = + validateStand(rejectTargetFlag(System.getProperty("stand", "legacy"))); private static final HttpClient HTTP = HttpClient.newHttpClient(); @@ -89,6 +90,28 @@ public static HttpResponse send(String method, String pathAndQuery, Stri } } + /** + * Fails fast when someone passes -Dtarget, which belongs to the e2e suite and is meaningless + * here. Ignoring it silently was worse than it sounds: `-Dtarget=modern` produced a fully GREEN + * run against the LEGACY stand, i.e. an equivalence proof that proved nothing. A safety net that + * can be pointed at the wrong stand without saying so is not a safety net. + */ + private static String rejectTargetFlag(String stand) { + String target = System.getProperty("target"); + if (target != null) { + throw new IllegalArgumentException( + "-Dtarget='" + + target + + "' is an e2e flag and does nothing in the characterization suite. This run would" + + " have gone green against whatever -DbaseUrl/-DdbUrl point at (default: legacy," + + " http://localhost:8080) while you believed it tested '" + + target + + "'. Pass all three flags instead, e.g.: -DbaseUrl=http://localhost:8090" + + " -DdbUrl=jdbc:postgresql://localhost:5434/werkstatt -Dstand=modern"); + } + return stand; + } + private static String validateStand(String value) { if (!"legacy".equals(value) && !"modern".equals(value)) { throw new IllegalArgumentException( diff --git a/docs/DEVIATIONS.md b/docs/DEVIATIONS.md index 26c2336..5e4eca6 100644 --- a/docs/DEVIATIONS.md +++ b/docs/DEVIATIONS.md @@ -25,6 +25,8 @@ Status values: **deferred(stage)** = lands in a named stage · **deferred(post-v | Statische Analyse (Error Prone / Sonar) — §6 | deferred(G7) | Formatting gates (Spotless) and angular-eslint exist since G5; JVM static analysis is scheduled with the G7 hardening pass. Silent until 2026-07-31. | | Releases: SemVer + GitHub Releases „ab Milestone 2" — §2 | **deviation by plan**, first release at G7 | MILESTONES (owner-approved) plans exactly one release, v1.0.0 at G7 — the stage tags are the release-equivalent deliverable until then. The contradiction between §2 and MILESTONES was silent until 2026-07-31; MILESTONES governs. | | README: Architekturdiagramm, Screenshots, Deployment-Abschnitt — §2 | deferred(G7) | MILESTONES G7 owns "README final"; diagram and screenshots land with the deployed stands they should show. Silent until 2026-07-31. | +| `docs/deployment.md` mit Schritten, Backups (pg_dump-Cron), TLS — §7 | **partially met** (2026-08-02, G6), production part deferred(G7) | **The file did not exist at all until 2026-08-02, and — worse for a ledger whose entire purpose is that there are no silent holes — the gap was not recorded here either. It was found by the doc audit of session 13, not by the ledger.** Now written: prerequisites per module, first run, the two stands, the database/seeding contract, every suite, CI reproduction, troubleshooting. What it still cannot deliver is the production half the standard names — Hetzner VPS + Dokploy steps, `pg_dump` backup cron, TLS via Traefik/Let's Encrypt — because none of it has been built. `deployment.md` §10 states that in the document itself rather than leaving the reader to discover it, and enumerates the open items. Two blockers are already registered elsewhere in this ledger and must be closed before any public exposure: no authentication on either stand (incl. the destructive `POST /admin/bereinigen`), and PostgreSQL 9.6 being end-of-life (P2). | +| Lokale Vollumgebung per Compose inkl. Keycloak/Mailpit/Observability-Profil — §7 | **partially met**, rest deferred(G7) | App + DB run per stand via Compose and have since stage 0/2. The three extra services the standard names are not present: Keycloak follows the AuthN/AuthZ row (owner re-scoping needed), Mailpit has no consumer — the application sends no mail — and the observability profile is part of the OTel row. Recorded 2026-08-02 so "Vollumgebung" stops silently meaning something smaller than the standard says. | | Lint/Format-Check in CI | **met** for `modern/`+test modules (2026-07-31, G5) · waived for `legacy/` | Spotless (google-java-format) bound to `verify` in modern/e2e/characterization; `ng lint` (angular-eslint) + `prettier --check` bound to modern `verify` — the existing CI verify steps enforce all gates. One-time mechanical reformat in the same commit series (stage 5). `legacy/` stays waived: a formatter would destroy the 2016 exhibit (hard rule: legacy stays legacy). | | Testcontainers für Integrationstests | **met** (2026-07-31, G6) | `modern/src/test/java/at/werkstatt/crm/service/WerkstattServiceIntegrationTest`: PostgreSQL **9.6** (the version the stands actually run — DEVIATIONS P2) started from the very same `modern/db/init` scripts the compose stand mounts, so there is no second schema copy to drift. Deliberately not a second characterization suite: it runs the service's real SQL without a deployed stand, so a broken query fails before anything is built. The golden masters keep owning the HTTP contract. | | `.env.example` gepflegt | **met** (2026-07-30) | Was missing for four stages despite being a hard rule — created; documents that the dev stands intentionally need no secrets. | diff --git a/docs/MANUAL_TASKS.md b/docs/MANUAL_TASKS.md new file mode 100644 index 0000000..a9ff0ec --- /dev/null +++ b/docs/MANUAL_TASKS.md @@ -0,0 +1,165 @@ +# MANUAL_TASKS.md — the steps a human has to do by hand + +Everything in this repository that is **not** automated, as checklists. Nothing here duplicates +[`deployment.md`](deployment.md) — that document explains how and why, this one is what you tick +off. Where a step needs more than one line of explanation, it links there. + +Print it, copy it into an issue, or just work down it. The order inside each list is the order to +do things in. + +--- + +## A. Once per machine + +Do this once. [Details and per-OS install commands: `deployment.md` §1](deployment.md#1-prerequisites) + +- [ ] **Docker + Compose plugin** installed, daemon running + → `docker compose version` prints v2.x or v5.x, `docker version` shows a `Server:` block +- [ ] **Your user is in the `docker` group** (Linux), and you have logged out and back in + → `docker ps` works without `sudo` +- [ ] **A JDK 25 or newer** on `PATH` + → `java -version` prints 25+ +- [ ] **Chrome or Chromium** installed — only if you will run the E2E suite + → `chromium --version` or `google-chrome --version` +- [ ] **`psql` client** — only if you want to inspect the databases + → `psql --version` +- [ ] `python3` and `column` available — only if you will run `ai-testgen/measure.sh` +- [ ] **First start works** + → `docker compose -f legacy/docker-compose.yml up -d --wait` and + loads + +Do **not** install Maven — the repo ships `./mvnw`, which fetches its own. +Do **not** install Node — the `modern` build installs its own. +Do **not** install a JDK 8 unless you specifically need to build `legacy/` outside Docker +([why](deployment.md#14-the-one-module-you-cannot-build-with-a-modern-jdk)). + +--- + +## B. Start of every working session + +- [ ] `git pull` +- [ ] Read the last entry in [`worklog.md`](worklog.md) — it ends with a **Next** line +- [ ] Read the current milestone in [`MILESTONES.md`](MILESTONES.md) +- [ ] Bring up the stands you need: + ```bash + docker compose -f legacy/docker-compose.yml up -d --wait + docker compose -f modern/docker-compose.yml up -d --wait + ``` + **`--wait` is not optional** — [why](deployment.md#2-first-run) +- [ ] Run the suites that guard what you are about to touch, **before** you touch it, so you know + the baseline was green and any red is yours: + ```bash + ./mvnw verify -f characterization/pom.xml + ./mvnw verify -f e2e/pom.xml -Dtarget=legacy + ``` + +--- + +## C. Every change, before the PR + +- [ ] Work on a branch. Direct pushes to `master` are blocked by branch protection. +- [ ] The safety net is green — **both** stands where the change could affect either: + ```bash + ./mvnw verify -f characterization/pom.xml + ./mvnw verify -f characterization/pom.xml \ + -DbaseUrl=http://localhost:8090 \ + -DdbUrl=jdbc:postgresql://localhost:5434/werkstatt -Dstand=modern + ./mvnw verify -f e2e/pom.xml -Dtarget=legacy + ./mvnw verify -f e2e/pom.xml -Dtarget=modern + ``` + ⚠️ The characterization suite has **no `-Dtarget`** — using it gives you a green run against + the *wrong* stand. [Read this once](deployment.md#51-characterization--the-equivalence-gate). +- [ ] `./mvnw verify -f modern/pom.xml` if `modern/` changed (needs Docker running) +- [ ] A **red suite is a stop condition.** Never skip, disable or `@Disabled` a test to get green. +- [ ] If you did not meet a standard, add a row to [`DEVIATIONS.md`](DEVIATIONS.md). Silence is + the one thing the ledger does not allow. +- [ ] An ADR in `docs/adr/` for every real migration decision +- [ ] Conventional Commit message +- [ ] `docs/worklog.md` entry: date, what, **measured hours**, decisions, next +- [ ] Open the PR; wait for all seven required checks +- [ ] Merge only on green + +--- + +## D. Completing a stage + +A stage is only done when all four exist — and they travel in **one** PR: + +- [ ] The working `docker compose up` state +- [ ] The playbook chapter in `playbook/` (German) +- [ ] The row in [`../stages.md`](../stages.md) +- [ ] The **annotated** git tag: + ```bash + git tag -a stage-N-name -m "what this state is" + git push origin stage-N-name + ``` + Annotated, not lightweight — a lightweight tag carries no author, date or message, and + provenance is the point of a stage tag. + +--- + +## E. Repository administration on GitHub + +### One-time (already done for this repo) + +- [ ] Branch protection on `master`: require a PR, require status checks, block force-push and + deletion, no bypass for admins + +### Every time a workflow is added or a job is renamed — **this one is easy to forget and breaks merges** + +- [ ] Merge the workflow first and **let the job run at least once**. A check that has never + reported cannot be selected as required. +- [ ] Add the new check to the required list in **Settings → Branches** (or **Rules → Rulesets**) +- [ ] Matrix jobs report as `job (value)` — this repo requires `e2e (legacy)` and `e2e (modern)`, + **not** `e2e` +- [ ] Renaming a job renames its check: the old required name never reports again and **every PR + blocks forever**. Update the protection rule in the same PR series. + +Currently required on `master` — seven checks: +`legacy-build` · `modern-build` · `e2e (legacy)` · `e2e (modern)` · `harness` · +`testbed-validation (legacy)` · `testbed-validation (modern)` + +### Ongoing + +- [ ] Review Dependabot PRs. `legacy/` is deliberately excluded from Dependabot — its EOL + dependencies are the exhibit, not a vulnerability to patch. + +--- + +## F. The AI test-generation experiment (G6) + +The only step in this repository that needs a credential. + +- [ ] Create an API key at and load it with credit +- [ ] `cp .env.example .env`, then set `OPENROUTER_API_KEY=` in `.env` (git-ignored; the harness + reads it itself, so the key never enters your shell history) +- [ ] Dry-run first — costs nothing: + `./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java -Dexec.args="plan"` +- [ ] Generate, then measure — [commands](deployment.md#8-the-ai-test-generation-experiment-g6) +- [ ] Check the row count of the resulting CSV: `measure.sh` does not validate its `phase` + argument, and a typo produces an empty-but-plausible-looking measurement + +Guard rails: the harness refuses any model outside the frozen price table and hard-aborts at €20 +total. The full executed run cost €0.65. + +--- + +## G. Re-capturing a golden master + +Only when a **sanctioned** behaviour change makes an existing golden master wrong. This is the +most dangerous manual task in the repo: a carelessly re-captured golden master silently deletes +the evidence that behaviour used to be different. + +- [ ] The change is registered in [ADR-0004](adr/0004-functional-equivalence-and-sanctioned-divergence.md) + **first**. No register entry, no re-capture. +- [ ] Re-capture per the procedure in [`../characterization/README.md`](../characterization/README.md) +- [ ] Prove green against **both** stands, twice +- [ ] Re-captured file + ADR-0004 register entry + commit travel together (ADR-0007) + +--- + +## H. What is *not* here yet + +Deployment to a server is not on this list because **there is nothing to deploy to yet** — see +[`deployment.md` §10](deployment.md#10-production-deployment--not-yet). When G7 lands, this +document gains a section for it. It will not gain one before. diff --git a/docs/SPEC.md b/docs/SPEC.md index 3133496..751167f 100644 --- a/docs/SPEC.md +++ b/docs/SPEC.md @@ -18,7 +18,7 @@ migration-lab/ ├── ai-testgen/ # experiment harness: prompts, generated tests, PIT mutation reports, evaluation notebook/report ├── playbook/ # German markdown chapters, one per stage; exportable ├── docs/ # PRD, SPEC, MILESTONES, ADRs, glossary, worklog -└── .github/workflows/ # legacy-ci.yml (must stay green), modern-ci.yml, e2e.yml (matrix: legacy|modern) +└── .github/workflows/ # legacy-ci.yml (must stay green), modern-ci.yml, e2e.yml (matrix: legacy|modern), ai-testgen.yml ``` **Git tags are first-class deliverables:** `stage-0-legacy`, `stage-1-safety-net`, `stage-2-jdk-build`, `stage-3-boot-2.7`, `stage-4-boot-4x`, `stage-5-angular`, `stage-6-cloud-ops`. Every tag: checkout → `docker compose up` → working app. A `stages.md` table maps tag → state → playbook chapter. @@ -55,7 +55,7 @@ Method (pre-registered in `ai-testgen/PROTOCOL.md` before running — Plösch-st ## 6. CI/CD -Three workflows today: legacy (build + characterization vs the legacy stand), modern (build + the same characterization suite vs the modern stand — the per-commit equivalence gate; module unit/integration tests incl. Testcontainers arrive with G6), e2e matrix (legacy|modern, nightly + on push/PR). Planned for G7: deployment job (modern) → GHCR → Dokploy. Badges per workflow in README. Engineering-Standards compliance status incl. dated deviations: `docs/DEVIATIONS.md`. +**Four** workflows today, supplying **seven** required checks on `master`: legacy (build + characterization vs the legacy stand), modern (build incl. Angular build, lint/format/coverage gates and the module tests — ArchUnit + Testcontainers, present since 2026-07-31 — plus the same characterization suite vs the modern stand, the per-commit equivalence gate), e2e matrix (legacy|modern, nightly + on push/PR), and ai-testgen (harness tests + testbed validation on both corpora; **no API key, no generation in CI**). Planned for G7: deployment job (modern) → GHCR → Dokploy. Badges per workflow in README. Engineering-Standards compliance status incl. dated deviations: `docs/DEVIATIONS.md`. Operating instructions: `docs/deployment.md`; the by-hand steps: `docs/MANUAL_TASKS.md`. ## 7. Playbook (`playbook/`, German) diff --git a/docs/deployment.md b/docs/deployment.md new file mode 100644 index 0000000..e0db95d --- /dev/null +++ b/docs/deployment.md @@ -0,0 +1,588 @@ +# deployment.md — running and operating migration-lab + +Required by [`ENGINEERING_STANDARDS.md`](ENGINEERING_STANDARDS.md) §7. **This file was missing +until 2026-08-02** — the obligation existed, the document did not, and it was not in the +deviations ledger either. That hole is now closed in both directions: the document exists, and +[`DEVIATIONS.md`](DEVIATIONS.md) carries the part it cannot yet deliver. + +**Scope, stated up front so you do not go looking for something that is not here:** + +| | Status | +|---|---| +| Running both stands locally (Docker Compose) | **documented here, works today** | +| Running every test suite | **documented here, works today** | +| Running the AI test-generation experiment | **documented here, works today** | +| Production deployment (Hetzner VPS + Dokploy, TLS, backups) | **does not exist yet — [§10](#10-production-deployment--not-yet)** | + +Every command below was executed on 2026-08-02 against this repository before being written +down. Where a command's output is quoted, that is the real output, not an illustration. + +**Companion document:** [`MANUAL_TASKS.md`](MANUAL_TASKS.md) is the checklist of steps a human +must do by hand. This file explains *how* and *why*; that one is what you tick off. + +--- + +## 1. Prerequisites + +### 1.1 The table the repo never had + +There is **no root `pom.xml`**. Every module is built with `-f /pom.xml`, and the +modules do not all want the same JDK. + +| You want to… | Needs | Notes | +|---|---|---| +| Run either stand | **Docker + Compose v2 or v5** | Nothing else. The applications are built inside Docker. | +| Build `modern/` | **JDK 25 or newer** + Docker running + network | Docker is needed because the test suite starts a real PostgreSQL (Testcontainers). Network because the build downloads its own Node. | +| Build `e2e/`, `characterization/`, `ai-testgen/harness/`, `ai-testgen/testbed/*` | **JDK 25 or newer** | | +| Run the E2E suite | + **Chrome or Chromium** installed | The driver downloads itself; the browser does not. | +| Build `legacy/` outside Docker | **JDK 8 — and only JDK 8** | You almost certainly do not need this. See [§1.4](#14-the-one-module-you-cannot-build-with-a-modern-jdk). | +| Run `ai-testgen/measure.sh` | + `python3`, `column` (util-linux) | Both are usually already present on Linux. | +| Run the AI generation step | + an OpenRouter API key | [§8](#8-the-ai-test-generation-experiment-g6) | + +**Verified on the development machine, 2026-08-02:** Docker Compose 5.3.1, `psql` 18.4, +OpenJDK 26.0.1, Maven 3.9.11 (supplied by the wrapper), Chromium present at `/usr/bin/chromium`. +JDK **26** builds every Java-25 module without complaint — "25 or newer" is literal. + +### 1.2 Docker + +`docker compose` (with a space) and `docker-compose` (with a hyphen) are **different programs**. +The hyphenated one is Compose v1, written in Python, and is no longer maintained. Everything +here needs the plugin. + + +```bash +docker compose version # must succeed and print v2.x or v5.x +docker version # a populated "Server:" block proves the daemon is reachable +``` + +**Install:** + +- **Ubuntu / Debian** — the official apt repository. Remove the distro packages first + (`docker.io`, `docker-compose`, `docker-compose-v2`, `docker-doc`, `docker-buildx`, + `podman-docker`), then follow (or + `…/debian/`). The five packages you end up with are `docker-ce docker-ce-cli containerd.io + docker-buildx-plugin docker-compose-plugin`. +- **Arch Linux** — Docker publishes **no** Engine install page for Arch + ( lists CentOS, Debian, Fedora, Raspberry Pi OS, + RHEL, Ubuntu and static binaries only; the Arch URL returns 404). The working route is the + Arch-maintained package, which is *not* Docker documentation: + ```bash + sudo pacman -S docker docker-compose + sudo systemctl enable --now docker.service + docker compose version # confirm this is the v2/v5 plugin despite the package name + ``` +- **macOS / Windows** — Docker Desktop is the only supported route + (). On Windows use the WSL 2 backend and enable + **Settings → Resources → WSL Integration** for your distro. + +**Linux post-install — do this or every command needs `sudo`.** The daemon owns a Unix socket +that only root can use by default: + +```bash +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker # or log out and back in +``` + +Docker states plainly: *"The `docker` group grants root-level privileges to the user."* That is +a real root-equivalence. On a shared machine, prefer `sudo docker`. + + +### 1.3 A JDK + +Maven needs **either** `JAVA_HOME` set **or** `java` on your `PATH` +(). You do **not** need to install Maven — this repo +ships the Maven Wrapper, which downloads Maven 3.9.11 itself. Always call `./mvnw`, never `mvn`. + +```bash +java -version # must be 25 or newer +``` + +| Platform | Install | Switch the default | +|---|---|---| +| Arch | `sudo pacman -S jdk-openjdk` (add `jdk8-openjdk` only if you really need §1.4) | `sudo archlinux-java set java-25-openjdk` — Arch does **not** set `JAVA_HOME`; it retargets `/usr/lib/jvm/default`, which is on your `PATH` | +| Ubuntu / Debian | Eclipse Temurin via | `sudo update-alternatives --config java` | +| macOS | `brew install --cask temurin` or the Adoptium `.pkg` | `export JAVA_HOME=$(/usr/libexec/java_home -v 25)` | +| Windows | The Adoptium `.msi` | Set `JAVA_HOME` in system environment variables | + +**Use a different JDK for exactly one command** — the trick worth knowing in a migration repo, +because it changes nothing globally: + +```bash +JAVA_HOME=/usr/lib/jvm/java-8-openjdk ./mvnw verify -f legacy/pom.xml +``` + +### 1.4 The one module you cannot build with a modern JDK + +`legacy/` is Java 8 (`1.8`, Spring Boot 1.5.22, packaged as a WAR), +and `./mvnw verify -f legacy/pom.xml` fails on a modern JDK — **but not for the reason everyone +assumes.** Measured on JDK 26, 2026-08-02: + +``` +compiler:3.1:compile OK ← javac still accepts source/target 8 +surefire:2.18.1:test OK ← there are no tests, by design +war:2.6:war FAILS ← "due to an API incompatibility" + ExceptionInInitializerError: Unable to make field private final + java.util.Comparator java.util.TreeMap.comparator accessible: + module java.base does not "opens java.util" to unnamed module +``` + +The blocker is `maven-war-plugin` **2.6** — pinned by Spring Boot 1.5's dependency management, +written before the module system, reflecting into `java.util` internals that JDK 16 sealed. No +compiler flag fixes it. This is a small, exact illustration of the project's thesis: what stops +an upgrade is usually the build plugins, not your source code. + +**Everything else builds fine on JDK 25/26**, including corpus A of the AI experiment — which +compiles the *same* Java-8 sources, but at `--release 8` through a modern compiler plugin. + +You normally never build `legacy/` yourself: `docker compose` builds it inside a +`maven:3.9-eclipse-temurin-8` image. Only reach for a local JDK 8 if you are debugging the +legacy build itself. + +### 1.5 A browser, for the E2E suite only + +The E2E suite drives **Chrome or Chromium**, always headless (`--headless=new`). There is no +non-headless switch. + +The **driver** installs itself: Selenium 4.46 has Selenium Manager built in, which detects your +browser, downloads the matching `chromedriver`, and caches it under `~/.cache/selenium`. Nothing +in this repo installs a driver, and nothing should. + + +The **browser** does not install itself in the version you have here. Install it: + +```bash +sudo pacman -S chromium # Arch +sudo apt install chromium-browser # Ubuntu/Debian +chromium --version # or: google-chrome --version +``` + +Selenium Manager needs network access the first time it resolves a driver (results are cached +for one hour by default, and unused versions are pruned after 30 days). + +--- + +## 2. First run + +Five commands, from a fresh clone. This is the whole of it. + +```bash +git clone https://github.com/Stoicera/migration-lab-java.git +cd migration-lab-java + +docker compose -f legacy/docker-compose.yml up -d --wait +docker compose -f modern/docker-compose.yml up -d --wait +``` + +Open (the 2016 application) and (the migrated +one). They are the same application, nine years apart. + +**`--wait` is not optional, and this is the single most common way to lose an hour here.** +Without it, `up -d` returns as soon as the containers are *running*, which is well before +PostgreSQL accepts connections and before Spring Boot has finished starting. The very next +`./mvnw verify` then fails against a stand that is not ready, with an error that points at the +tests rather than at the timing. `--wait` blocks until the healthchecks pass — both compose +files define them, and CI has always used `--wait`. + + +The first run builds two application images and pulls `postgres:9.6`; expect several minutes. +Later runs start in about a second. + +**Verify:** + +```bash +docker compose -f legacy/docker-compose.yml ps +``` + +``` +SERVICE STATUS PORTS +app Up 23 minutes (healthy) 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp +db Up 23 minutes (healthy) 127.0.0.1:5433->5432/tcp +``` + +Both services must say **`(healthy)`**, not merely `Up`. + +--- + +## 3. The two stands + +| | Legacy stand | Modern stand | +|---|---|---| +| Compose file | `legacy/docker-compose.yml` | `modern/docker-compose.yml` | +| Stack | Java 8 · Spring Boot 1.5.22 · AngularJS 1.8 · WAR | Java 25 · Spring Boot 4.1 · Angular 22 · executable JAR | +| Application | | | +| Admin page | (JSP) | (SPA route) | +| PostgreSQL | `127.0.0.1:5433` | `127.0.0.1:5434` | +| DB credentials | `werkstatt` / `werkstatt` / `werkstatt` | identical | +| Named volume | `werkstatt-db` | `modern-werkstatt-db` | +| Container names | `legacy-db-1`, `legacy-app-1` | `modern-db-1`, `modern-app-1` | + +The two run side by side on purpose — that is the exhibit. Both use PostgreSQL **9.6** so that +the database is one variable fewer while everything above it changes. + +**On the credentials:** they are dev-only and deliberately in plain sight in the compose files. +Nothing here is a secret. The only real credential in the project is the OpenRouter API key +([§8](#8-the-ai-test-generation-experiment-g6)). + +**On network exposure — read this before running on an untrusted network.** The two **database** +ports are bound to `127.0.0.1` and are unreachable from outside the machine. The two +**application** ports (8080, 8090) are **not** — they are published on all interfaces, and +neither stand has any authentication, including the destructive `POST /admin/bereinigen`. Do not +run these stands on a public network. + +Container names are derived from the compose file's parent directory. If you override the project +name (`-p` or `COMPOSE_PROJECT_NAME`), every `docker exec legacy-db-1 …` command in the docs +stops matching. + +### Stopping + +```bash +docker compose -f legacy/docker-compose.yml down # stop, KEEP the database +docker compose -f legacy/docker-compose.yml down -v # stop, DESTROY the database +``` + +`down` removes containers and networks but **not** named volumes. Only `-v` removes the data. + + +--- + +## 4. The database + +### 4.1 The seeding contract — the rule that costs people an afternoon + +Both stands mount `db/init/` read-only at `/docker-entrypoint-initdb.d`. The official PostgreSQL +image runs those scripts **only when the data directory is empty** — i.e. only on the very first +start against a fresh volume. If a volume already holds a database, initialization is skipped +entirely, *by design*, to avoid overwriting data. + + +The consequence, stated bluntly because it is not intuitive: + +> **Editing `db/init/*.sql` and restarting the container does nothing.** +> Not `restart`, not `down` + `up`, not `up --build`. Rebuilding the image does not help either — +> the data is in the volume, not the image. + +To actually re-seed, destroy the volume: + +```bash +docker compose -f legacy/docker-compose.yml down -v +docker compose -f legacy/docker-compose.yml up -d --wait +docker volume ls | grep werkstatt # confirm the old volume is really gone +``` + +Scripts run in alphabetical order, which is why they are named `01-schema.sql` and `02-daten.sql`. + +**`legacy/db/init/` and `modern/db/init/` are byte-identical copies**, and `legacy-ci` fails the +build if they ever diverge (`diff -q` on both files). Edit both, or edit one and let CI catch you. + +### 4.2 Both test suites reset from the *legacy* seed file + +Worth knowing before you edit seed data: `e2e/` and `characterization/` both read +`legacy/db/init/02-daten.sql` to reset the database — **even when they are targeting the modern +stand.** That is safe only because of the `diff -q` guard above, and that guard runs in CI, not +locally. Edit `modern/db/init/02-daten.sql` alone and you get a stand and a test-reset that +disagree, with no local signal at all. + +### 4.3 Three different ways the data gets reset + +| Mechanism | Scope | When | +|---|---|---| +| The suites' own reset | `TRUNCATE` of the five tables + replay of `02-daten.sql` | automatically, before test classes | +| Manual psql | whatever you type | when you are poking around | +| `down -v` + `up` | the whole volume, re-runs `db/init/` | after a **schema** change | + +The suites' reset truncates exactly `kunde, fahrzeug, auftrag, auftrag_position, rechnung`. A new +table is never reset by it — that needs mechanism three. + +### 4.4 Connecting with psql + +You need only the **client**, not a server: `sudo pacman -S postgresql-libs` (Arch), +`sudo apt install postgresql-client` (Debian/Ubuntu), `brew install libpq` (macOS). + +```bash +# legacy stand (port 5433) — non-interactive, no password prompt +PGPASSWORD=werkstatt psql -h 127.0.0.1 -p 5433 -U werkstatt -d werkstatt -w -c 'SELECT count(*) FROM kunde;' + +# modern stand (port 5434) +PGPASSWORD=werkstatt psql -h 127.0.0.1 -p 5434 -U werkstatt -d werkstatt -w -c '\dt' + +# URI form, if you prefer one argument +psql "postgresql://werkstatt:werkstatt@127.0.0.1:5433/werkstatt" +``` + +Real output of the first command against a seeded stand: + +``` + count +------- + 10 +(1 row) +``` + +Inside psql: `\dt` lists tables, `\d kunde` describes one, `\l` lists databases, `\q` quits. + +A modern `psql` (18.x) against the 9.6 server works and prints a version-mismatch notice on +connect; that notice is expected, not a problem. + +### 4.5 PostgreSQL 9.6 is end-of-life + +9.6 reached its final release **2021-11-11**. It receives no security patches of any kind. It is +used here deliberately — an unchanged database keeps one variable fixed while the stack around it +moves — and is registered as deviation **P2** in [`DEVIATIONS.md`](DEVIATIONS.md), with the +upgrade scheduled for G7. The `postgres:9.6` image is still pullable but is no longer a supported +tag; if you need reproducibility years from now, pin it by digest. + + +--- + +## 5. Running the test suites + +**Every suite except the module tests needs a running stand.** Start it with `--wait` first. + +| Suite | What it proves | Stand needed | +|---|---|---| +| `characterization` | The HTTP + DB behaviour still matches the frozen 2016 golden masters | the one you point it at | +| `e2e` | The same Selenium scenarios pass through both user interfaces | the one you point it at | +| `modern` module tests | Architecture rules and real SQL, without any stand | none — but Docker must be running | +| `ai-testgen` harness | The experiment harness itself | none | + +### 5.1 Characterization — the equivalence gate + +```bash +# against the legacy stand (all defaults) +./mvnw verify -f characterization/pom.xml + +# against the modern stand — all three flags are required +./mvnw verify -f characterization/pom.xml \ + -DbaseUrl=http://localhost:8090 \ + -DdbUrl=jdbc:postgresql://localhost:5434/werkstatt \ + -Dstand=modern +``` + +> **Trap, and it fails silently.** This suite has **no `-Dtarget` flag** — that one belongs to +> `e2e` only. `./mvnw verify -f characterization/pom.xml -Dtarget=modern` runs happily, goes +> **green**, and has tested the *legacy* stand. You would then believe you had proven equivalence +> when you had proven nothing. There are three separate flags here and you need all three. +> (Since 2026-08-02 the suite fails fast on a stray `-Dtarget` instead of ignoring it.) + +`-Dstand` selects which side of a sanctioned divergence (ADR-0004) is expected. It changes no URL. + +### 5.2 E2E — the Selenium safety net + +```bash +./mvnw verify -f e2e/pom.xml -Dtarget=legacy +./mvnw verify -f e2e/pom.xml -Dtarget=modern +``` + +Here `-Dtarget` is the *only* switch you need: it selects the base URL, the database URL **and** +the selector map in one go. Anything other than `legacy` or `modern` fails immediately. + +Screenshots of failures land in `e2e/target/screenshots/`. + +### 5.3 The modern module build + +```bash +./mvnw verify -f modern/pom.xml +``` + +**Docker must be running.** This is a hard precondition nobody wrote down before: the suite +includes a Testcontainers test that starts a real `postgres:9.6` from the same `db/init` scripts +the stand uses. No Docker daemon, no build. + +This one command also: installs its own Node (v24.18.1 — you do **not** need Node installed), +runs `npm ci` and the Angular production build, then at `verify` runs `ng lint`, +`prettier --check`, Spotless (google-java-format) and the JaCoCo coverage ratchet. It is the +slowest command in the repo and the one CI cares most about. + +### 5.4 What `verify` adds over `test` here + +Not what the textbook says. `characterization/` and `e2e/` have **no Failsafe plugin** — their +tests are ordinary Surefire tests that happen to talk to `http://localhost:8080`. So: + +``` +test → Surefire runs the tests (the stand must already be up) +verify → additionally runs the format gate (Spotless), and in modern/ the lint + coverage gates +``` + +Use `verify`. `test` skips the gates that CI enforces, so a green `test` tells you less than you +think. + +### 5.5 Useful Maven flags + +| Flag | Effect | +|---|---| +| `-f ` | which module — always required, there is no root pom | +| `-q` | quiet: warnings and errors only | +| `-B` | batch mode, no ANSI colour — what CI uses | +| `-o` | offline; fails rather than downloading | +| `-Dtest=ClassName` | run one test class | +| `-DskipTests` | compile tests but do not run them | + +Both suites set `failIfNoTests=true`, so a run that discovers zero tests fails loudly instead of +passing. That is deliberate. + +--- + +## 6. Reproducing CI locally + +CI is the arbiter, so it is worth being able to run exactly what it runs. Seven checks are +required on `master`. + +| Check | Local equivalent | +|---|---| +| `legacy-build` | `diff -q legacy/db/init/01-schema.sql modern/db/init/01-schema.sql` (and `02-daten.sql`), then `JAVA_HOME= ./mvnw -B verify -f legacy/pom.xml`, then the legacy stand + characterization | +| `modern-build` | `./mvnw -B verify -f modern/pom.xml`, then the modern stand + characterization with the three flags | +| `e2e (legacy)` | `./mvnw -B verify -f e2e/pom.xml -Dtarget=legacy` | +| `e2e (modern)` | `./mvnw -B verify -f e2e/pom.xml -Dtarget=modern` | +| `harness` | `./mvnw -B verify -f ai-testgen/harness/pom.xml` | +| `testbed-validation (legacy)` | `./mvnw -B -Pvalidation -f ai-testgen/testbed/legacy/pom.xml test org.pitest:pitest-maven:mutationCoverage` | +| `testbed-validation (modern)` | same with `modern` | + +CI additionally runs the E2E suite **nightly at 02:00 UTC**, which is where flakiness would show +up before a human notices it. + +--- + +## 7. Rebuilding after a code change + +```bash +docker compose -f modern/docker-compose.yml up -d --build --wait +``` + +`--build` rebuilds the image before starting. If a change genuinely seems to be ignored, escalate: + +```bash +docker compose -f modern/docker-compose.yml build --no-cache +docker compose -f modern/docker-compose.yml up -d --force-recreate --wait +``` + +Note that the **image build runs `mvn package -DskipTests`** — deliberately. The lint, format, +coverage and architecture gates live in `verify` and run in CI and locally, not in the image +build. A green `docker compose build` therefore proves nothing about quality gates. + +--- + +## 8. The AI test-generation experiment (G6) + +Everything except the generation calls works without a key: + +```bash +# what would run and what it has cost so far +./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java -Dexec.args="plan" + +# render the prompts without calling anything +./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java \ + -Dexec.args="render --corpus A --model anthropic/claude-sonnet-5 --out /tmp/prompts" +``` + +**The one manual credential in this repository.** Create a key at +, then: + +```bash +cp .env.example .env # .env is git-ignored +$EDITOR .env # set OPENROUTER_API_KEY=... +``` + +The harness reads `.env` by itself, so the key never enters your shell history. An +`OPENROUTER_API_KEY` in the environment wins over the file. + +```bash +./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java \ + -Dexec.args="generate --corpus A --model anthropic/claude-sonnet-5" + +./ai-testgen/measure.sh 2026-07-31 anthropic_claude-sonnet-5 A as-generated +``` + +Guard rails, so a mistake cannot get expensive: the harness refuses any model outside the frozen +price table, and hard-aborts at **€20** total spend summed over every recorded call. The executed +run of 24 calls cost **€0.65**. + +`measure.sh` needs `python3` and `column`. It does **not** validate its `phase` argument: a typo +produces "skip … no ``/ directory" for every unit and a header-only CSV that looks like a +completed measurement. Check the row count. + +--- + +## 9. Troubleshooting + +Symptoms are what you actually see; causes are what is actually wrong. + +| Symptom | Cause | Fix | +|---|---|---| +| `permission denied … /var/run/docker.sock` | Your user is not in the `docker` group | `sudo usermod -aG docker $USER`, then `newgrp docker` or re-login | +| `Cannot connect to the Docker daemon` | Daemon not running, or `DOCKER_HOST` points elsewhere | `sudo systemctl start docker`; `env \| grep DOCKER_HOST` | +| `port is already allocated` / `address already in use` | Something else holds 8080/8090/5433/5434 — often a stale container | `docker ps -a`, `docker compose ps -a`; stop it or free the port | +| Tests fail immediately with connection refused or `DB reset to seed state failed` | The stand was not healthy yet | You omitted `--wait`. Re-run `up -d --wait` | +| Your `db/init/*.sql` edit has no effect | Init scripts run only against an **empty** data directory | `down -v` then `up -d --wait` — [§4.1](#41-the-seeding-contract--the-rule-that-costs-people-an-afternoon) | +| Characterization is green but you tested the wrong stand | You used `-Dtarget` — which this suite does not have | Use `-DbaseUrl` + `-DdbUrl` + `-Dstand` together | +| `release version 8 not supported` / `invalid target release` | You are building `legacy/` on a modern JDK | Build it via Docker, or prefix `JAVA_HOME=` | +| `modern` build fails in `WerkstattServiceIntegrationTest` | Docker is not running — Testcontainers needs it | Start Docker | +| `npm ci` fails: lockfile out of sync | `package.json` was edited without regenerating the lockfile | `cd modern/frontend && npm install`, commit the lockfile | +| `prettier --check` or `ng lint` fails the build | Formatting gate | `cd modern/frontend && npm run format` | +| Spotless fails the build | Java formatting gate | `./mvnw spotless:apply -f /pom.xml` | +| `session not created: This version of ChromeDriver only supports Chrome version N` | Cached driver no longer matches an updated browser | `rm -rf ~/.cache/selenium` and re-run; Selenium Manager re-resolves | +| E2E fails with no browser found | Chrome/Chromium is not installed | [§1.5](#15-a-browser-for-the-e2e-suite-only) | +| `No tests were executed` | The suites treat this as a failure on purpose | Check your `-Dtest` filter or module path | +| Disk filling up | Docker never reclaims automatically | `docker system df`, then `docker system prune` (add `--volumes` **only** if you mean it) | + +--- + +## 10. Production deployment — not yet + +**There is no production deployment, and this section deliberately contains no instructions for +one.** `ENGINEERING_STANDARDS.md` §7 requires deployment documentation covering a Hetzner VPS +with Dokploy, `pg_dump` backup cron, and TLS via Traefik/Let's Encrypt. None of that has been +built. Writing plausible steps for infrastructure that does not exist is precisely the kind of +documentation this project exists to argue against — you would follow it, it would not work, and +you would trust the rest of the repo less. + +What is true today, so the gap is measurable rather than vague: + +| Required by §7 | Status | +|---|---| +| Local full environment via Compose | **done** — [§2](#2-first-run), minus the Keycloak/Mailpit/observability profile the standard also names | +| Hetzner VPS + Dokploy deployment steps | **not started** (G7) | +| Backups (`pg_dump` cron) | **not started** (G7) | +| TLS (Traefik / Let's Encrypt via Dokploy) | **not started** (G7) | +| 12-factor config via environment | **partly** — both stands take `SPRING_DATASOURCE_*` from the environment; `.env.example` reserves `DOKPLOY_URL`, `DOKPLOY_TOKEN`, `GHCR_TOKEN` | +| Automatic migrations (Flyway) | **not started** — registered as B18 in `DEVIATIONS.md`, owned by G7 | + +Two things must be settled **before** anything is exposed publicly, and both are already in the +ledger rather than being discovered later: + +1. **Neither stand has authentication** — including the destructive `POST /admin/bereinigen` + inherited from the JSP admin page. A public demo must protect `/admin` at minimum. +2. **PostgreSQL 9.6 is end-of-life** ([§4.5](#45-postgresql-96-is-end-of-life)). An unpatched + 9.6 reachable from a network is not acceptable; the upgrade needs its own ADR because + collation changes can move the golden masters. + +This section gets replaced by real, executed steps when G7 lands — not before. + +--- + +## Deutsche Kurzfassung + +Dieses Dokument ist die **Betriebsanleitung** des Repos und war bis 2026-08-02 nicht vorhanden, +obwohl `ENGINEERING_STANDARDS.md` §7 es verlangt. + +Der schnellste Weg zu zwei laufenden Ständen: + +```bash +docker compose -f legacy/docker-compose.yml up -d --wait +docker compose -f modern/docker-compose.yml up -d --wait +``` + +Die drei Dinge, die erfahrungsgemäß Zeit kosten und deshalb oben ausführlich stehen: + +1. **`--wait` weglassen.** Ohne `--wait` läuft der Container zwar, die Datenbank nimmt aber noch + keine Verbindungen an — der nächste Testlauf scheitert an einem Timing-Problem, das wie ein + Testfehler aussieht ([§2](#2-first-run)). +2. **`db/init/*.sql` ändern und neu starten.** Das tut nichts: Die Init-Skripte laufen nur gegen + ein leeres Datenverzeichnis. Nur `down -v` setzt wirklich zurück + ([§4.1](#41-the-seeding-contract--the-rule-that-costs-people-an-afternoon)). +3. **`-Dtarget=modern` bei den Charakterisierungstests.** Diesen Schalter gibt es dort nicht — + der Lauf wird grün und hat den *Legacy*-Stand geprüft. Es braucht `-DbaseUrl`, `-DdbUrl` und + `-Dstand` zusammen ([§5.1](#51-characterization--the-equivalence-gate)). + +**Produktivdeployment gibt es noch nicht** (Etappe G7). [§10](#10-production-deployment--not-yet) +listet die offenen Punkte, statt Schritte für eine Infrastruktur zu erfinden, die es nicht gibt. diff --git a/e2e/README.md b/e2e/README.md index e30561b..50a06a7 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -192,11 +192,18 @@ by `SelectorMapParityTest`. ## Run ```bash -docker compose -f legacy/docker-compose.yml up -d +docker compose -f legacy/docker-compose.yml up -d --wait ./mvnw verify -f e2e/pom.xml -Dtarget=legacy -docker compose -f modern/docker-compose.yml up -d +docker compose -f modern/docker-compose.yml up -d --wait ./mvnw verify -f e2e/pom.xml -Dtarget=modern ``` -Requires Chrome/Chromium (Selenium Manager resolves the driver; CI uses the -preinstalled Chrome on ubuntu runners). +`-Dtarget` is the only switch needed here: it selects base URL, DB URL **and** +selector map together. Anything but `legacy`/`modern` fails immediately. + +Requires a local Chrome/Chromium **binary** — Selenium Manager downloads the +matching driver by itself and caches it in `~/.cache/selenium`, but it does not +install the browser. CI uses the preinstalled Chrome on ubuntu runners. If a +browser update outruns the cached driver (`session not created: This version of +ChromeDriver only supports Chrome version N`), delete `~/.cache/selenium` and +re-run. diff --git a/e2e/src/test/resources/selectors/legacy.properties b/e2e/src/test/resources/selectors/legacy.properties index 309b187..21cc7c9 100644 --- a/e2e/src/test/resources/selectors/legacy.properties +++ b/e2e/src/test/resources/selectors/legacy.properties @@ -3,8 +3,11 @@ # scenarios and page objects stay untouched. # How Waits.idle() detects "no pending HTTP work" — a property of the UI under -# test, not of the scenario. Known: angularjs ($http.pendingRequests). Stage 5 -# adds: angular (Angular testability API). Unknown values throw (fail-loud). +# test, not of the scenario. Known: angularjs ($http.pendingRequests) and +# angular, which is NOT the classic Testability API: the stage-5 app is zoneless, +# so Testability observes nothing and the app exposes its own interceptor counter +# (window.werkstattOffeneRequests) instead — see modern.properties and e2e/README. +# Unknown values throw (fail-loud). wait.strategy=angularjs nav.kunden=a[href='#!/kunden'] diff --git a/legacy/README.md b/legacy/README.md index c17a36b..efe3e46 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -8,16 +8,48 @@ pattern-faithful (ADR-0001); every deliberate wart is catalogued in ## Run it ```bash -docker compose -f legacy/docker-compose.yml up -d +docker compose -f legacy/docker-compose.yml up -d --wait ``` - SPA: http://localhost:8080 — customers, vehicles, orders, invoices, monthly report - JSP admin page: http://localhost:8080/admin (deliberately unprotected — see LEGACY_NOTES B15/B16) -- PostgreSQL: localhost:5433 (werkstatt/werkstatt), seeded from `db/init/` +- PostgreSQL: 127.0.0.1:5433 (werkstatt/werkstatt), seeded from `db/init/` -Build without Docker requires JDK 8 (`./mvnw verify -f legacy/pom.xml` from repo -root). On a modern local JDK, build via the image instead — the Dockerfile uses -`maven:3.9-eclipse-temurin-8`. +### Building it outside Docker — and why that fails + +`./mvnw verify -f legacy/pom.xml` on a modern local JDK **fails**, but not for the +reason people assume. Measured on JDK 26 (2026-08-02), the build gets further than +expected: + +``` +[INFO] --- compiler:3.1:compile --- OK ← javac still accepts source/target 8 +[INFO] --- surefire:2.18.1:test --- OK ← there are no tests, by design +[INFO] --- war:2.6:war --- FAILS +[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war + … due to an API incompatibility +[ERROR] ExceptionInInitializerError: Unable to make field private final + java.util.Comparator java.util.TreeMap.comparator accessible: + module java.base does not "opens java.util" to unnamed module +``` + +**It is not the Java 8 source level — it is the 2016 build plugin.** +`maven-war-plugin` 2.6, pinned by Spring Boot 1.5's dependency management, +reflects into `java.util` internals. JDK 16 made that strong encapsulation the +default, so the plugin cannot initialise at all. No compiler flag fixes this; +the plugin predates the module system. + +That is precisely why the Dockerfile builds this module inside +`maven:3.9-eclipse-temurin-8` — and it is a nice miniature of the whole project: +the thing that blocks the upgrade is rarely your own code. + +If you really need a local build, point one command at a JDK 8 without changing +anything globally: + +```bash +JAVA_HOME=/usr/lib/jvm/java-8-openjdk ./mvnw verify -f legacy/pom.xml +``` + +Full operations reference: [`docs/deployment.md`](../docs/deployment.md). ## Rules for this directory (root `CLAUDE.md`) diff --git a/modern/README.md b/modern/README.md index 1214b28..024e73d 100644 --- a/modern/README.md +++ b/modern/README.md @@ -7,11 +7,16 @@ artifact). Current state: see [`../stages.md`](../stages.md). ## Run it (side by side with the legacy stand) ```bash -docker compose -f modern/docker-compose.yml up -d +docker compose -f modern/docker-compose.yml up -d --wait ``` - App: http://localhost:8090 · admin (SPA route since stage 5): http://localhost:8090/admin -- PostgreSQL: localhost:5434 (werkstatt/werkstatt), same committed seed as legacy +- PostgreSQL: 127.0.0.1:5434 (werkstatt/werkstatt), same committed seed as legacy + +**`./mvnw verify -f modern/pom.xml` requires a running Docker daemon** — the module +tests include a Testcontainers integration test that starts a real `postgres:9.6` +from the very same `db/init` scripts the compose stand mounts. Full operations +reference: [`docs/deployment.md`](../docs/deployment.md). ## Frontend build (stage 5) diff --git a/modern/frontend/README.md b/modern/frontend/README.md index e792dca..4fe2cec 100644 --- a/modern/frontend/README.md +++ b/modern/frontend/README.md @@ -1,59 +1,64 @@ -# WerkstattFrontend +# modern/frontend — the Angular 22 UI -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 22.1.2. +The stage-5 replacement for the AngularJS 1.8 UI, built **into** the Spring Boot jar. +Generated with Angular CLI 22.1.2; this file replaces the CLI boilerplate, which documented +commands this project does not have. -## Development server +## You usually do not build this directly -To start a local development server, run: +`./mvnw verify -f modern/pom.xml` builds the frontend as part of the backend: +`frontend-maven-plugin` installs its own pinned **Node v24.18.1**, runs `npm ci` against the +committed lockfile, and runs the production build. **No system-wide Node is required** — the +same idea as the Dockerized JDK 8 build of `legacy/`. -```bash -ng serve -``` - -Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. - -## Code scaffolding - -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: +## The dev loop, when you want one ```bash -ng generate component component-name +cd modern/frontend +npm ci # first time, or after a lockfile change — NOT npm install +npm start # ng serve on http://localhost:4200 ``` -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: +This one does need a locally installed Node. `npm ci` requires `package-lock.json` to be in +sync with `package.json` and deletes `node_modules` first; if the two have drifted it fails +loudly rather than silently rewriting the lockfile — then use `npm install` and commit the +result. -```bash -ng generate --help -``` +**There is no backend proxy configured, on purpose.** `ng serve` gives you the UI with no API +behind it. The reference environment is the compose stand +(`docker compose -f modern/docker-compose.yml up -d --wait` → ), because +that is what the E2E suite and the per-commit equivalence gate actually test. -## Building +## Gates that will fail your build -To build the project run: +Both run at `verify` in the Maven build and in CI: ```bash -ng build +npm run lint # ng lint (angular-eslint) +npm run format:check # prettier --check +npm run format # prettier --write — the fix ``` -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. +## Tests -## Running unit tests +**There are none in this directory, and `npm test` will not work** — no test runner, no +configuration and no spec files are installed, despite the `test` script the CLI left behind. -To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command: +That is a deliberate position, not an oversight: this UI's correctness is covered from the +outside by the Selenium suite in [`../../e2e/`](../../e2e/), which runs the *same scenarios* +against the old AngularJS UI and this one. That equivalence is the exhibit; a component-level +suite would not demonstrate it. Frontend unit tests are a post-v1.0 candidate, and this +paragraph exists so the gap is stated rather than discovered. -```bash -ng test -``` - -## Running end-to-end tests - -For end-to-end (e2e) testing, run: - -```bash -ng e2e -``` +`ng e2e` is likewise not configured. -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. +## The one contract you must not break -## Additional Resources +The app maintains `window.werkstattOffeneRequests`, an HTTP-interceptor counter +(`src/app/offene-requests.interceptor.ts`). The E2E wait strategy reads it to decide when the UI +is idle, because the app is **zoneless** and Angular's classic Testability API therefore +observes nothing. It is a testability contract: do not remove it, and route new traffic through +`HttpClient` rather than raw `fetch`, or the counter stops telling the truth. -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. +See [`../README.md`](../README.md), [`../../e2e/README.md`](../../e2e/README.md) and +[`../../docs/deployment.md`](../../docs/deployment.md). From ede8590c5d36786b0fc78e7b3d2727bb130dc515 Mon Sep 17 00:00:00 2001 From: Sebastian Kern Date: Sun, 2 Aug 2026 11:34:51 +0200 Subject: [PATCH 3/3] =?UTF-8?q?feat(g6):=20Phase=20B=20measured,=20G6=20cl?= =?UTF-8?q?osed=20=E2=80=94=20and=20Phase=20A=20was=20survivorship=20bias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amendment A2 fixed the Phase-B method BEFORE any repair ran: mutually blind parallel repairers, repair-may-not-add-tests, `null` output is ABANDONED at zero and must not be averaged in, truncated output is salvaged not completed. 11 cells repaired, one isolated agent each, 30-minute cap, live fix log. A2.2 was verified mechanically rather than asserted: @Test counts identical in all 24 cells, sole exception the A2.4 salvage that dropped one cut-off method. Phase A Phase B green cells 12/24 21/24 test methods 154 (3 red) 421 (0 red) line / branch 100% / 100% 90.5% / 78.8% mutation score 99.2% 73.2% The quality metrics got WORSE, and that is the result. Phase A's perfect figures were computed only over the cells that happened to compile — exclusively the small controllers; the God class was not in the denominator. Repair puts it in. Phase A was survivorship bias, visible only because the protocol forced every failed cell to be measured to the end. Repaired, the God class reaches ~83% line coverage at a 44-56% mutation score: half the injected faults survive the one class this whole experiment is about. A coverage gate would have passed it. Three more findings: one model wrote 134 test methods where the other wrote 13, at byte-identical measured value (21/21 lines, 13/13 mutants); 15 wrong-expectation repairs found ZERO real defects in production code — these tests pin behaviour, they do not audit it; and the open-weight model emitted getStatusCodeValue(), present in corpus A's Spring 4.3 and REMOVED in corpus B's Spring 7 — migrating to a very new stack makes LLM support temporarily worse. Two defects in our own work, disclosed rather than quietly fixed: - A3: one cell in 24 was decided by our extraction rule, not the model. It wrote a draft, rejected it in plain text, then wrote a correct 26-test class; our "first fenced block" rule kept the draft. NOT re-extracted — a rule does not become wrong because it cost a point. 12/24 stands; the REPORT's taxonomy row is corrected. - A4: the repair-effort clock is contaminated by A2.1's own parallelism (one cell: 24.7 wall-clock minutes for a build that worked 5.6 seconds). Minutes published as a measured upper bound; the transferable figures are the 52 fixes and categories. Adoption (ADR-0011): one class per unit, highest mutation score, ties to FEWER test methods — the rule that rejects the 134-method class. Selected a mixed set (2 frontier, 4 open-weight). 88 methods adopted, 99 module tests green, coverage 37.3% -> 81.3%, ratchet 0.35 -> 0.80. §3's 80% target reached rather than declared for the first time; stated next to it that branch coverage still lags 23 points and the adopted God-class suite kills only 44.1% of mutants. Verification: char 47/47 vs legacy AND modern - e2e 34/34 vs legacy AND modern - harness 24/24 - both testbed validations - modern verify 99 tests at the 0.80 gate. The safety net is untouched. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 14 +- ai-testgen/PROTOCOL.md | 45 + ai-testgen/README.md | 19 +- ai-testgen/REPORT.md | 244 +- ai-testgen/runs/2026-07-31/README.md | 30 +- .../A/measurements-repaired.csv | 7 + .../repaired/PHASE-B-ABANDONED.txt | 14 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 192 + .../AuftragController.java.html | 1338 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 16 + .../repaired/pit-reports/style.css | 574 + ...crm.gen.AuftragControllerGeneratedTest.xml | 77 + ...crm.gen.AuftragControllerGeneratedTest.txt | 4 + .../AuftragControllerGeneratedTest.java | 193 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 198 + .../KundenController.java.html | 1340 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 20 + .../repaired/pit-reports/style.css | 574 + ....crm.gen.KundenControllerGeneratedTest.xml | 79 + ....crm.gen.KundenControllerGeneratedTest.txt | 4 + .../KundenControllerGeneratedTest.java | 228 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 186 + .../RechnungController.java.html | 937 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 11 + .../repaired/pit-reports/style.css | 574 + ...rm.gen.RechnungControllerGeneratedTest.xml | 74 + ...rm.gen.RechnungControllerGeneratedTest.txt | 4 + .../RechnungControllerGeneratedTest.java | 141 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 174 + .../AdminController.java.html | 887 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 5 + .../repaired/pit-reports/style.css | 574 + ...t.crm.gen.AdminControllerGeneratedTest.xml | 71 + ...t.crm.gen.AdminControllerGeneratedTest.txt | 4 + .../AdminControllerGeneratedTest.java | 155 + .../measurements/repaired/maven-test.log | 66 + .../repaired/RechnungGeneratedTest.java | 13 + .../B/measurements-repaired.csv | 7 + .../repaired/PHASE-B-ABANDONED.txt | 14 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 183 + .../AuftragController.java.html | 1324 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 16 + .../repaired/pit-reports/style.css | 574 + ...crm.gen.AuftragControllerGeneratedTest.xml | 73 + ...crm.gen.AuftragControllerGeneratedTest.txt | 4 + .../AuftragControllerGeneratedTest.java | 181 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 189 + .../KundenController.java.html | 1326 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 20 + .../repaired/pit-reports/style.css | 574 + ....crm.gen.KundenControllerGeneratedTest.xml | 73 + ....crm.gen.KundenControllerGeneratedTest.txt | 4 + .../KundenControllerGeneratedTest.java | 194 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 177 + .../RechnungController.java.html | 923 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 11 + .../repaired/pit-reports/style.css | 574 + ...rm.gen.RechnungControllerGeneratedTest.xml | 70 + ...rm.gen.RechnungControllerGeneratedTest.txt | 4 + .../RechnungControllerGeneratedTest.java | 150 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 165 + .../AdminController.java.html | 775 + .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 5 + .../repaired/pit-reports/style.css | 574 + ...t.crm.gen.AdminControllerGeneratedTest.xml | 68 + ...t.crm.gen.AdminControllerGeneratedTest.txt | 4 + .../AdminControllerGeneratedTest.java | 132 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 189 + .../at.werkstatt.crm.model/Rechnung.java.html | 1748 +++ .../at.werkstatt.crm.model/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 15 + .../repaired/pit-reports/style.css | 574 + ...erkstatt.crm.gen.RechnungGeneratedTest.xml | 84 + ...erkstatt.crm.gen.RechnungGeneratedTest.txt | 4 + .../repaired/RechnungGeneratedTest.java | 208 + ai-testgen/runs/2026-07-31/fix-log.csv | 53 + .../A/measurements-repaired.csv | 7 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 214 + .../WerkstattService.java.html | 10035 +++++++++++++ .../at.werkstatt.crm.service/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 114 + .../repaired/pit-reports/style.css | 574 + ....crm.gen.WerkstattServiceGeneratedTest.xml | 107 + ....crm.gen.WerkstattServiceGeneratedTest.txt | 4 + .../WerkstattServiceGeneratedTest.java | 749 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 186 + .../AuftragController.java.html | 1338 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 16 + .../repaired/pit-reports/style.css | 574 + ...crm.gen.AuftragControllerGeneratedTest.xml | 82 + ...crm.gen.AuftragControllerGeneratedTest.txt | 4 + .../AuftragControllerGeneratedTest.java | 365 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 192 + .../KundenController.java.html | 1345 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 20 + .../repaired/pit-reports/style.css | 574 + ....crm.gen.KundenControllerGeneratedTest.xml | 73 + ....crm.gen.KundenControllerGeneratedTest.txt | 4 + .../KundenControllerGeneratedTest.java | 269 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 186 + .../RechnungController.java.html | 937 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 11 + .../repaired/pit-reports/style.css | 574 + ...rm.gen.RechnungControllerGeneratedTest.xml | 75 + ...rm.gen.RechnungControllerGeneratedTest.txt | 4 + .../RechnungControllerGeneratedTest.java | 219 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 168 + .../AdminController.java.html | 887 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 5 + .../repaired/pit-reports/style.css | 574 + ...t.crm.gen.AdminControllerGeneratedTest.xml | 71 + ...t.crm.gen.AdminControllerGeneratedTest.txt | 4 + .../AdminControllerGeneratedTest.java | 233 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 190 + .../at.werkstatt.crm.model/Rechnung.java.html | 1776 +++ .../at.werkstatt.crm.model/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 15 + .../repaired/pit-reports/style.css | 574 + ...erkstatt.crm.gen.RechnungGeneratedTest.xml | 69 + ...erkstatt.crm.gen.RechnungGeneratedTest.txt | 4 + .../repaired/RechnungGeneratedTest.java | 182 + .../B/measurements-repaired.csv | 7 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 212 + .../WerkstattService.java.html | 11673 ++++++++++++++++ .../at.werkstatt.crm.service/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 114 + .../repaired/pit-reports/style.css | 574 + ....crm.gen.WerkstattServiceGeneratedTest.xml | 127 + ....crm.gen.WerkstattServiceGeneratedTest.txt | 4 + .../WerkstattServiceGeneratedTest.java | 679 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 183 + .../AuftragController.java.html | 1324 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 16 + .../repaired/pit-reports/style.css | 574 + ...crm.gen.AuftragControllerGeneratedTest.xml | 194 + ...crm.gen.AuftragControllerGeneratedTest.txt | 4 + .../AuftragControllerGeneratedTest.java | 1981 +++ .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 201 + .../KundenController.java.html | 1326 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 20 + .../repaired/pit-reports/style.css | 574 + ....crm.gen.KundenControllerGeneratedTest.xml | 75 + ....crm.gen.KundenControllerGeneratedTest.txt | 4 + .../KundenControllerGeneratedTest.java | 347 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 177 + .../RechnungController.java.html | 923 ++ .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 11 + .../repaired/pit-reports/style.css | 574 + ...rm.gen.RechnungControllerGeneratedTest.xml | 69 + ...rm.gen.RechnungControllerGeneratedTest.txt | 4 + .../RechnungControllerGeneratedTest.java | 170 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 165 + .../AdminController.java.html | 775 + .../at.werkstatt.crm.controller/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 5 + .../repaired/pit-reports/style.css | 574 + ...t.crm.gen.AdminControllerGeneratedTest.xml | 66 + ...t.crm.gen.AdminControllerGeneratedTest.txt | 4 + .../AdminControllerGeneratedTest.java | 123 + .../measurements/repaired/jacoco.xml | 1 + .../measurements/repaired/maven-test.log | 187 + .../at.werkstatt.crm.model/Rechnung.java.html | 1748 +++ .../at.werkstatt.crm.model/index.html | 62 + .../repaired/pit-reports/index.html | 74 + .../repaired/pit-reports/mutations.xml | 15 + .../repaired/pit-reports/style.css | 574 + ...erkstatt.crm.gen.RechnungGeneratedTest.xml | 66 + ...erkstatt.crm.gen.RechnungGeneratedTest.txt | 4 + .../repaired/RechnungGeneratedTest.java | 148 + ai-testgen/runs/2026-07-31/repair-effort.csv | 12 + docs/DEVIATIONS.md | 2 +- docs/adr/0011-adopting-generated-tests.md | 82 + docs/worklog.md | 107 + modern/pom.xml | 13 +- .../crm/gen/AdminControllerGeneratedTest.java | 134 + .../gen/AuftragControllerGeneratedTest.java | 193 + .../gen/KundenControllerGeneratedTest.java | 202 + .../gen/RechnungControllerGeneratedTest.java | 179 + .../crm/gen/RechnungGeneratedTest.java | 157 + .../gen/WerkstattServiceGeneratedTest.java | 711 + playbook/06-ki-testgenerierung-gemessen.md | 113 +- 236 files changed, 75280 insertions(+), 50 deletions(-) create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/measurements-repaired.csv create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/repaired/RechnungGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/measurements-repaired.csv create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/repaired/RechnungGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/fix-log.csv create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/measurements-repaired.csv create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/repaired/RechnungGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/measurements-repaired.csv create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/jacoco.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/maven-test.log create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/index.html create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/style.css create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt create mode 100644 ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/repaired/RechnungGeneratedTest.java create mode 100644 ai-testgen/runs/2026-07-31/repair-effort.csv create mode 100644 docs/adr/0011-adopting-generated-tests.md create mode 100644 modern/src/test/java/at/werkstatt/crm/gen/AdminControllerGeneratedTest.java create mode 100644 modern/src/test/java/at/werkstatt/crm/gen/AuftragControllerGeneratedTest.java create mode 100644 modern/src/test/java/at/werkstatt/crm/gen/KundenControllerGeneratedTest.java create mode 100644 modern/src/test/java/at/werkstatt/crm/gen/RechnungControllerGeneratedTest.java create mode 100644 modern/src/test/java/at/werkstatt/crm/gen/RechnungGeneratedTest.java create mode 100644 modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java diff --git a/README.md b/README.md index f37a71e..40ad810 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,16 @@ safety net first, honest numbers, reusable German migration playbook. > (the deliberate divergences — security fix, absorbed admin page, fixed > "undefined" alert — are registered and pinned per stand in > [ADR-0004](docs/adr/0004-functional-equivalence-and-sanctioned-divergence.md)). -> Next: measured AI test generation (G6) — protocol **frozen before anything ran** -> (tag `ai-testgen-protocol-v1`); 24 generation calls executed 2026-07-31 for €0.65, -> Phase A measured in [`ai-testgen/REPORT.md`](ai-testgen/REPORT.md). Phase B (repair -> effort) follows. +> **G6 complete (2026-08-02): measured AI test generation**, protocol **frozen before anything +> ran** (tag `ai-testgen-protocol-v1`), 24 calls for €0.65, both phases measured in +> [`ai-testgen/REPORT.md`](ai-testgen/REPORT.md). The result is the unflattering one: as +> generated, 12 of 24 classes compiled and *looked* perfect (100 % coverage, 99.2 % mutation +> score); after repair brought 21 of 24 green, the same metrics fell to **90.5 % line / 73.2 % +> mutation** — the perfect figures had been computed only over the cells that happened to +> compile, i.e. the easy ones. **Survivorship bias, measured and published rather than +> quietly kept.** Six repaired test classes were adopted into `modern/` (88 methods, +> [ADR-0011](docs/adr/0011-adopting-generated-tests.md)), lifting its coverage 37 % → **81 %**. +> Next: G7 — operations, deployment and launch. > Progress: [`stages.md`](stages.md) · [`docs/worklog.md`](docs/worklog.md). ## Why this exists diff --git a/ai-testgen/PROTOCOL.md b/ai-testgen/PROTOCOL.md index ffd956c..e4d3e90 100644 --- a/ai-testgen/PROTOCOL.md +++ b/ai-testgen/PROTOCOL.md @@ -456,3 +456,48 @@ pre-register the rule it wants (first block / last block / longest block / all b concatenated) **and** publish how many cells the choice actually moved. Ours moved one in twenty-four — roughly four percentage points of the headline compile rate, from a line of code nobody would have thought to argue about. + +### A4 — 2026-08-02, after Phase B: the repair-effort clock is contaminated, and by our own design + +**This entry changes no number.** It records a defect in the repair-effort metric, found after +Phase B ran, and it is the second non-pre-declared finding of this milestone (see A3 on why such +findings are labelled as weaker than the §8 threats). + +**What happened.** A2.1 put the eleven repairable cells in parallel, each in its own worktree, to +remove the learning-transfer confound. Up to six agents therefore ran at once on an 8-core +machine, and **every one of them repeatedly invoked Maven** — compile, test, repeat. The measured +quantity is wall-clock, so each cell's number absorbed the queueing delay caused by the others. + +**The evidence is unambiguous and came from a repairer's own report.** The `M2 / corpus A / +AuftragController` cell recorded **24.7 wall-clock minutes**, while the Maven build it was waiting +on reported **5.6 seconds** of work; roughly 23 of those minutes were a stall before the first +invocation returned. Its three fixes spanned about one minute of actual editing. + +**Why the fix-log timestamps cannot repair the number.** §6 step 5 requires a *live* log. Several +repairers instead wrote all their rows in one burst at the end, so the span between first and last +timestamp is 0.0 minutes in six of eleven cells and cannot be used to reconstruct active time. +That is a protocol-compliance failure on the repairers' part, and it is recorded here rather than +quietly worked around. + +**What this means for reading the numbers, stated at every one of them in `REPORT.md`:** + +- The per-cell minutes are an **upper bound**, inflated by an unknown, non-uniform amount. They + are **not** a measure of how long the repair took. +- The **contention-immune** figures are the ones to actually use: the **number of fixes** per cell + and their **category distribution**. Those are unaffected by scheduling and are what transfers + to another project. +- The ordering the numbers imply — the God class and the 135-method truncated class cost far more + than a missing import — is corroborated by the fix counts, so the *ranking* survives even though + the *magnitudes* do not. + +**The honest self-assessment.** A2.1 traded a known confound for an unexamined one. Removing +learning transfer was right; not pinning the measurement environment to one build at a time was +not, and it was foreseeable — the protocol already insists elsewhere (§5) that a measurement +environment which inherits its compiler from the local Maven is not reproducible. The same +argument applies to a measurement environment that shares eight cores with five siblings, and it +was not made. + +**What a replication must do:** run the repair cells **serially**, or in parallel with a hard cap +of one concurrent build, on an otherwise idle machine — and record per-cell CPU time alongside +wall-clock so the two can be compared. Keep A2.1's blindness between cells; it is the parallel +*execution*, not the mutual blindness, that caused this. diff --git a/ai-testgen/README.md b/ai-testgen/README.md index 8bdaf59..39e6550 100644 --- a/ai-testgen/README.md +++ b/ai-testgen/README.md @@ -6,13 +6,20 @@ their migrated counterparts, run in **G6**. The empirical protocol is **pre-regi `ai-testgen-protocol-v1`, 2026-07-31) *before* any generation ran, and results are never curated afterwards. Failed generations stay in the repo. -**Status: generation executed (2026-07-31, 24 calls, €0.65), Phase A measured and reported -in [`REPORT.md`](REPORT.md). Phase B — the time-boxed repair — is next.** +**Status: COMPLETE.** Generation executed 2026-07-31 (24 calls, €0.65), Phase A measured the same +day, Phase B (time-boxed repair) measured 2026-08-02. Full results: [`REPORT.md`](REPORT.md). -Phase-A headline: 12 of 24 generated test classes compiled; where they compiled, they reached -100 % line and branch coverage on the target class and a 99.2 % PIT mutation score — but the -613-line God service, the one class that actually needs the help, produced nothing usable in -any of its four cells. +**The headline, and it is not the flattering one.** As generated, 12 of 24 test classes compiled +and those 12 looked perfect: 100 % line and branch coverage, 99.2 % mutation score. After repair +brought 21 of 24 cells green, the same metrics fell to **90.5 % line, 78.8 % branch, 73.2 % +mutation** — because Phase A's perfect numbers had been computed only over the cells that happened +to compile, which were exclusively the small controllers. **Phase A was survivorship bias.** The +613-line God service, once repaired, is the only class in the experiment that resists: ~83 % of +its lines covered while **~50 % of injected faults survive**. A coverage gate would have passed it. + +Two further results worth the click: one model wrote **134 test methods** where the other wrote +**13**, with byte-identical measured value; and across 15 wrong-expectation repairs there were +**zero** real defects found in the code under test — these tests pin behaviour, they do not audit it. ## Layout diff --git a/ai-testgen/REPORT.md b/ai-testgen/REPORT.md index af227d1..cbc908c 100644 --- a/ai-testgen/REPORT.md +++ b/ai-testgen/REPORT.md @@ -1,14 +1,20 @@ # REPORT.md — AI-assisted test generation, measured -**Status: Phase A (as generated) complete and reported below. Phase B (time-boxed repair) -not yet executed** — it runs in the next session and this document is extended, not rewritten. +**Status: COMPLETE.** Phase A (as generated) measured 2026-07-31, Phase B (time-boxed repair) +measured 2026-08-02. Phase A's numbers below are unchanged from the day they were published. Executed under the pre-registered `PROTOCOL.md` **v1.0**, git tag `ai-testgen-protocol-v1`, -SHA-256 `e7d02d2adfe03ca0cfc690794fbcb7db834a967781eab2aec1f6884c97c41037`. Run date +SHA-256 `e7d02d2adfe03ca0cfc690794fbcb7db834a967781eab2aec1f6884c97c41037`. Generation run date **2026-07-31**. Raw artifacts — prompts, requests, responses, generated code including the -broken files, JaCoCo and PIT reports — are in [`runs/2026-07-31/`](runs/2026-07-31/). -Nothing here was curated after the fact; the one post-freeze change is amendment A1, which -improved *recording* and explicitly did not re-run anything. +broken files, the repaired files, JaCoCo and PIT reports, the fix log — are in +[`runs/2026-07-31/`](runs/2026-07-31/). + +Nothing here was curated after the fact. Four post-freeze amendments, all dated, all in +`PROTOCOL.md`: **A1** improved recording and re-ran nothing; **A2** fixed the four Phase-B method +decisions *before* Phase B ran; **A3** and **A4** are disclosures of two defects found *after* +the fact — one in the extraction rule, one in our own repair-effort measurement — and neither +changes a number. Both are labelled throughout as weaker than the pre-declared §8 threats, +because they are. --- @@ -55,17 +61,79 @@ brauchbar erzeugt. 4. **Kosten sind nicht das Problem.** Der komplette Versuch kostete weniger als ein Kaffee. Die relevanten Kosten stehen in Phase B (Nachbesserung) — und die wird erst gemessen. -**Was hier noch nicht steht:** der Nachbesserungsaufwand. Die Hälfte der Zellen ist -reparaturbedürftig, und erst Phase B beantwortet die eigentliche Wirtschaftlichkeitsfrage: -*Wie teuer ist der Weg von „generiert“ zu „brauchbar“?* Ohne diese Zahl ist jede Aussage über -den Nutzen von KI-Testgenerierung unvollständig — deshalb steht hier ausdrücklich keine. - **Belastbarkeit:** N = 6 pro Korpus, ein Versuch je Zelle. Das ist eine sauber gemessene Illustration, **keine Studie mit statistischer Aussagekraft**. Alle Zahlen sind modell- und datumsgebunden. --- +## Phase B — nach der Nachbesserung (2026-08-02) + +Elf Zellen waren reparaturbedürftig. Jede wurde von einer **eigenen, für die anderen blinden** +KI-Instanz repariert, 30-Minuten-Deckel, mit fest vorgegebenen Kategorien und der harten Regel: +**reparieren ja, dazuschreiben nein** — kein Testfall, den das Modell nicht selbst geschrieben +hat (Nachtrag A2). Nachgeprüft, nicht geglaubt: die Zahl der `@Test`-Methoden ist in **allen 24** +Zellen unverändert; die einzige Ausnahme ist der eine abgeschnittene Fall, wo die angeschnittene +135. Methode entfernt wurde. + +| Kennzahl | Phase A (wie generiert) | Phase B (repariert) | +|---|---|---| +| Grüne Zellen | 12 von 24 | **21 von 24** | +| Testmethoden gesamt | 154 (3 rot) | **421 (0 rot)** | +| Line-Coverage | 222/222 = 100 % | 792/875 = **90,5 %** | +| Branch-Coverage | 30/30 = 100 % | 145/184 = **78,8 %** | +| Mutation-Score | 129/130 = 99,2 % | 306/418 = **73,2 %** | + +**Lesen Sie diese Tabelle zweimal. Die Qualitätszahlen sind nach der Reparatur *schlechter* — +und das ist das wichtigste Ergebnis des ganzen Meilensteins.** + +Nicht weil die Reparatur etwas verschlechtert hätte. Sondern weil die makellosen Phase-A-Werte +nur über die Zellen gerechnet waren, die **zufällig kompilierten** — und das waren ausnahmslos +die kleinen, leichten Controller. Die schwere Klasse war gar nicht im Nenner. Erst die Reparatur +holt sie hinein, und dann sieht man, was wirklich da ist. **Phase A war ein Überlebenden-Effekt +(Survivorship Bias), kein Qualitätsnachweis** — und genau so entstehen die „KI schreibt perfekte +Tests"-Zahlen, die man in Blogposts liest: gemessen wird, was funktioniert hat. + +**Die fünf Befunde für die Kalkulation:** + +1. **Die Gottklasse bleibt die Mauer — auch nach der Reparatur.** Repariert kompiliert und läuft + sie, aber sie ist die einzige Klasse im Versuch, die der Prüfung nicht standhält: + **84,3 % Line-Coverage bei 55,9 % Mutation-Score** (Korpus A) bzw. **82,5 % bei 44,1 %** + (Korpus B). Jede andere Klasse: 100 % / 100 %. Übersetzt: *Bei der Gottklasse überlebt fast + jede zweite eingebaute Fehlerveränderung die Tests.* Ein Coverage-Report hätte hier „über + 80 %, passt" gemeldet. +2. **Mehr Tests sind nicht mehr Wert — hier ist die Quittung.** Für denselben Controller + erzeugte das eine Modell **13** Testmethoden, das andere **134**. Das Ergebnis ist bis auf die + Stelle identisch: 21/21 Zeilen, 2/2 Zweige, 13/13 Mutanten. **Das Zehnfache an Testcode, + exakt null zusätzlicher Fehlerfindung** — und der zehnfache Wartungsaufwand für immer. +3. **Nach der Reparatur dreht sich das Modell-Ranking um.** Das billige offene Modell steht bei + **12 von 12** grünen Zellen, das teure bei 9 von 12. Aber ehrlich gerechnet: **10 der 11 + Reparaturen entfielen auf das billige Modell.** Es ist 18-mal günstiger im Einkauf und hat + praktisch den gesamten Nachbesserungsaufwand verursacht. Und die drei verbleibenden + Fehlstellen des teuren Modells sind keine kaputten Tests, sondern zweimal *„gar keine + Antwort im Budget"* und einmal ein Fehler **unserer eigenen Auswertung** (siehe unten). +4. **Kein einziger echter Programmfehler gefunden.** 15 Reparaturen betrafen falsche Erwartungen + der Tests — **keine davon** deckte einen Defekt im Produktivcode auf. Wer KI-Tests als + Fehlersuche verkauft, hat dafür hier keine Belege: Sie zementieren das vorhandene Verhalten, + sie prüfen es nicht. +5. **Die Modernisierung kann KI-Hilfe kurzfristig *verschlechtern*.** Der einzige saubere + Korpus-B-Befund: Das offene Modell schrieb `getStatusCodeValue()` — eine Methode, die es in + Spring 4.3 (Korpus A) gibt und die Spring 7 (Korpus B) **entfernt** hat. Das Spitzenmodell + benutzte sie korrekt nur im Legacy-Korpus. *Wer auf einen sehr neuen Stack migriert, wird + kurzfristig schlechter von LLMs unterstützt, weil deren Wissen dem Framework hinterherhinkt* — + ein realer Übergangseffekt, den man einplanen sollte. + +**Was wir zum Aufwand ehrlich NICHT sagen können.** Der Reparaturaufwand sollte in Minuten +berichtet werden. Die gemessenen 154 Minuten über 11 Zellen sind **unbrauchbar als Zeitangabe**: +Weil die Zellen parallel liefen (unsere Entscheidung, Nachtrag A2.1), haben sie sich gegenseitig +die Maschine weggenommen — eine Zelle meldet 24,7 Minuten Wanduhr für einen Maven-Lauf, der +5,6 Sekunden gearbeitet hat. Wir berichten die Minuten trotzdem, als **Obergrenze und als +gemessen**, und sagen dazu, dass die belastbare Größe die **Zahl und Art der Eingriffe** ist: +52 Eingriffe, davon 19 Import/Syntax, 17 Mock-Aufbau, 15 falsche Erwartung, 1 strukturell. +Details und die Selbstkritik dazu: Nachtrag A4 im Protokoll. + +--- + ## English detail ### 1. What was run @@ -106,11 +174,36 @@ Compile rate by cell: M1/A 4/6 · M2/A 3/6 · M1/B **5/6** · M2/B **0/6**. |---|---|---| | Output budget exhausted | 3 | M1 on S1 in both corpora (entire budget spent on reasoning tokens, message content never started); M2 on `AuftragController` corpus B (visible truncation mid-method, after emitting an increasingly degenerate test-method name) | | Missing imports | 8 | M2 dominated: `class Rechnung`, `ResponseEntity`, `ArgumentCaptor` used without importing them | -| Malformed import | 1 | M1 on S4 corpus A emitted `org.assertj.org.assertj.core.api` — a duplicated package prefix | - -Every one of these is cheap to repair by hand, which is exactly what Phase B will quantify. -A 50 % compile rate with an expected-cheap repair profile is a very different economic story -from a 50 % rate that needs redesign — the numbers to distinguish them do not exist yet. +| Malformed import | 1 | M1 on S4 corpus A — **this row was wrong about the model and is corrected below (amendment A3)** | + +> **Correction, 2026-08-02 — the "malformed import" cell was our failure, not the model's.** +> Found while repairing, and reported here because the original row would otherwise stand as an +> unearned point against arm M1. +> +> That cell's reply contains **two** ```` ```java ```` blocks. The first is an empty class body +> carrying the malformed `org.assertj.org.assertj.core.api` import. Between them the model writes, +> verbatim: *"Wait, I need to produce the correct final answer without mistakes. Let me redo it +> properly."* The second block is a complete class with **26 test methods and the import spelled +> correctly**. `finish_reason` is `stop` — the model finished, and its final answer was the good +> one. Our pre-registered §5 rule takes the **first** fenced block, so the pipeline recorded the +> model's self-rejected draft and discarded its actual answer. +> +> **The 12/24 compile rate stands as measured and the cell was not re-extracted.** Re-reading an +> artifact more favourably *after seeing that it cost a number* is exactly the fraud +> pre-registration prevents; the rule does not become wrong because it was expensive. What +> changes is the *description*: this is a **prompt-compliance failure** (the system prompt says +> "exactly one … single ```java code block") plus a naive extraction rule — not broken code. +> +> **Scope, checked rather than assumed:** all 24 responses were scanned. **One** cell is +> affected; 21 contain exactly one block and 2 contain none (the budget-exhausted cells). +> Counterfactual, stated as a counterfactual: under a last-block rule the Phase-A compile rate +> would have been 13/24 rather than 12/24 — about four percentage points of the headline number, +> decided by a line of code nobody would have thought to argue about. + +The corrected reading of the taxonomy: **9 of the 12 Phase-A failures are missing or malformed +imports**, i.e. genuinely cheap; 3 are "no answer within the pinned output budget"; and 1 of the +9 is really an artifact of our own extraction rule. Whether "cheap" survives contact with the +measurement is what Phase B answers below — and for the God class, it does not. ### 4. Observations that survive the small sample @@ -168,7 +261,120 @@ Note that 32 000 of M1's completion tokens — more than half its total — were that produced no answer at all. **Reasoning tokens are billed whether or not they lead to an answer.** -### 7. Reproduce it +### 7. Phase B — results after time-boxed repair (2026-08-02) + +Eleven cells needed work. Each was repaired by its own agent instance, blind to every other cell, +30-minute cap, fixed categories, and the hard rule that **repair may not add a test the model did +not write** (amendment A2). Compliance was verified mechanically, not asserted: `@Test` counts are +identical in all 24 cells before and after, the single exception being the truncated cell where +the cut-off 135th method was dropped under the A2.4 salvage rule. + +The 13 cells that did not need work are carried through unchanged, so +`measurements-repaired.csv` covers all 24 and is directly comparable with the Phase-A file. + +| | Phase A | Phase B | +|---|---|---| +| Cells compiling **and** running green | 12 / 24 | **21 / 24** | +| Test methods (failures + errors) | 154 (3) | **421 (0)** | +| Line coverage, target classes | 222/222 = 100 % | 792/875 = **90.5 %** | +| Branch coverage, target classes | 30/30 = 100 % | 145/184 = **78.8 %** | +| PIT mutation score | 129/130 = 99.2 % | 306/418 = **73.2 %** | + +Per cell, green-cell counts: M1/A 4→4 · M1/B 5→5 · M2/A 3→**6** · M2/B 0→**6**. + +**The quality metrics got worse, and that is the central result.** Not because repair damaged +anything — it added no tests and removed one truncated stub — but because Phase A's perfect +figures were computed over the cells that *happened to compile*, which were exclusively the small +controllers. The God class was absent from the denominator. Repair puts it in, and the aggregate +immediately tells a different story. **Phase A was survivorship bias, not a quality result.** Any +published "LLMs write excellent tests" number computed only over runs that succeeded has the same +defect. + +**Per-unit, after repair.** Every class reaches 100 % line and 100 % mutation — except one: + +| Cell | Tests | Line | Branch | Mutation | +|---|---|---|---|---| +| M2/A `WerkstattService` (God class) | 36 | 177/210 = 84.3 % | 51/70 = 72.9 % | **62/111 = 55.9 %** | +| M2/B `WerkstattService` (God class) | 40 | 236/286 = 82.5 % | 54/74 = 73.0 % | **49/111 = 44.1 %** | +| every other green cell | 6–134 | 100 % | 100 % | 100 % (one at 94.1 %) | + +The God class is the only unit where coverage and mutation score disagree sharply, and the +disagreement is enormous: **~83 % of its lines are covered while ~50 % of injected faults +survive.** A coverage gate at 80 % would have passed this class. That gap is the entire argument +for mutation testing, and it appears exactly where the milestone predicted it would. + +**Test count is not test value, quantified.** For `AuftragController` on corpus B, M1 produced +13 test methods and M2 produced 134 — a 10× difference. Their measured value is identical to the +digit: 21/21 lines, 2/2 branches, 13/13 mutants killed. The 121 extra methods find nothing and +must be maintained forever. + +### 8. Repair effort — reported, and honestly discounted + +| Category | Fixes | What it actually was | +|---|---|---| +| `IMPORT/SYNTAX` | 19 | missing import of the class under test; ambiguous `Date` across two wildcard imports; test-method names containing literal spaces; a removed Spring API | +| `MOCKING-SETUP` | 17 | almost entirely `JdbcTemplate` overload/varargs mismatches — `any()` matching a single vararg, matchers mixed with raw arguments, stubs shadowing each other | +| `WRONG-EXPECTATION` | 15 | year-derived invoice prefixes hard-coded to 2025; umlaut handling in the search term; asserting a re-read entity carries a status the code writes via SQL; a state transition the state machine forbids | +| `STRUCTURAL` | 1 | the A2.4 truncation salvage | +| `BUG-FOUND` | **0** | — | +| `ABANDONED` | 2 | the two cells whose recorded output was the literal `null` | + +**Zero `BUG-FOUND` across 15 wrong-expectation repairs.** Not one generated test caught a real +defect in the code under test; every mismatch was the model misreading the code. Generated tests +here **pin existing behaviour**, they do not audit it — which is why the protocol requires a +characterization and E2E layer underneath them (§2). + +**The minutes, and why you should not use them.** Total wall clock: **154 minutes over 11 cells**, +range 1.4 – 28.1. Two cells hit the 30-minute cap region: the God class (28.1 min, 14 fixes) and +the 134-method truncated controller (25.3 min, 6 fixes). + +These numbers are contaminated, by our own design decision, and amendment **A4** records it in +full. A2.1 ran the cells in parallel to remove learning transfer; up to six agents therefore shared +an 8-core machine while all of them repeatedly invoked Maven. One repairer reported it precisely: +**24.7 wall-clock minutes waiting on a Maven build that itself did 5.6 seconds of work.** The +fix-log timestamps cannot rescue the figure either — several repairers batched their log writes at +the end instead of logging live as §6 requires, so the span is 0.0 minutes in six of eleven cells. + +So: the minutes are reported **as measured and as an upper bound**, and the transferable numbers +are the **fix counts and categories** above, which no scheduler can distort. The *ranking* the +minutes imply survives independently — the God class and the 134-method class needed 14 and 6 +fixes, a missing import needed 1. + +Read together with T8 (the repairer is an AI agent of the same family as arm M1): none of these +figures is a person-minutes estimate for a human team, and A2.1 makes them **per-cell cold-start** +effort — nobody gets faster on the ninth identical missing import, because there is no ninth +repairer who saw the first eight. + +### 9. The research questions, answered + +- **RQ1 — how much compiles and passes with no human help?** 12 of 24 cells (50 %), 151 of 154 + test methods in the compiling subset. Of the 12 failures, 9 are import-level, 3 are "no answer + within the pinned budget", and 1 of the 9 is an artifact of our extraction rule (A3). +- **RQ2 — real quality, before and after repair?** As generated, on the surviving subset: 100 % + coverage, 99.2 % mutation. After repair, on nearly the whole matrix: 90.5 % line, 78.8 % branch, + **73.2 % mutation**. The honest headline is the second row, and the difference between the two is + survivorship, not improvement. +- **RQ3 — what does it cost, and where?** €0.65 of tokens for everything; repair concentrated in + `IMPORT/SYNTAX` (19) and `MOCKING-SETUP` (17), the latter almost entirely `JdbcTemplate` overload + and varargs mismatches — i.e. **the cost is driven by how hard the dependency is to mock**, not + by the number of lines. Minutes: see §8 and A4. +- **RQ4 — frontier vs open-weight?** As generated, the frontier model wins clearly (9/12 vs 3/12 + compiling). After repair the open-weight model reaches **12/12** and the frontier model stays at + 9/12 — but **10 of the 11 repairs were spent on the open-weight model**, and the frontier model's + three gaps are two non-answers and one extraction artifact, not broken code. Cheap buys you + tokens at 1/18th the price and hands you essentially the entire repair bill. +- **RQ5 — does migrating pay off in testability?** **No effect demonstrated, and we will not + manufacture one.** The God class scored *lower* on the migrated corpus (44.1 % vs 55.9 % + mutation) but was *cheaper* to repair there (9.4 vs 28.1 minutes) — contradictory, k = 1, + noise-dominated, and T7 says any difference would be a migration effect rather than an injection + effect anyway. The one clean corpus-B finding runs the *other* way: the open-weight model emitted + `ResponseEntity.getStatusCodeValue()`, which exists in corpus A's Spring 4.3 and was **removed in + corpus B's Spring 7**. The frontier model used that API only on corpus A. **Migrating to a very + new stack can make LLM assistance temporarily worse**, because model knowledge lags the + framework. That is a real, plannable transition cost, and it is the opposite of what the + milestone hoped to show. + +### 10. Reproduce it ```bash ./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java -Dexec.args="plan" @@ -176,7 +382,9 @@ answer.** ./mvnw -q -f ai-testgen/harness/pom.xml compile exec:java \ -Dexec.args="generate --corpus A --model anthropic/claude-sonnet-5" ./ai-testgen/measure.sh 2026-07-31 anthropic_claude-sonnet-5 A as-generated +./ai-testgen/measure.sh 2026-07-31 anthropic_claude-sonnet-5 A repaired ``` Identical output is not expected even at temperature 0 (T3); that is why every raw response is -committed rather than re-derived. +committed rather than re-derived. If you replicate Phase B, run the cells **serially** and record +CPU time as well as wall clock — A4 explains what we got wrong. diff --git a/ai-testgen/runs/2026-07-31/README.md b/ai-testgen/runs/2026-07-31/README.md index 576291b..cf8914a 100644 --- a/ai-testgen/runs/2026-07-31/README.md +++ b/ai-testgen/runs/2026-07-31/README.md @@ -37,5 +37,31 @@ Each call's serving provider is in its `usage.json`. ## Phase status -- **Phase A (as generated): complete.** Every cell measured, failures included. -- **Phase B (time-boxed repair): not started.** It begins in the next session. +- **Phase A (as generated): complete** (2026-07-31). Every cell measured, failures included. +- **Phase B (time-boxed repair): complete** (2026-08-02). 11 cells repaired, 2 recorded + `ABANDONED` (their output was the literal `null` — amendment A2.3), 11 needed no work. + `measurements-repaired.csv` covers all 24 cells; `fix-log.csv` and `repair-effort.csv` in this + directory are the aggregated logs. + +## Two further things a reader should know + +**3. One cell was decided by our extraction rule, not by the model** — arm M1, corpus A, S4 +`Rechnung`. Its reply holds two ```` ```java ```` blocks: an abandoned draft with a malformed +import, the sentence *"Wait, I need to produce the correct final answer without mistakes"*, then a +complete 26-test class with the import correct. The pre-registered "first block" rule kept the +draft. **The cell was not re-extracted and the 12/24 compile rate stands as measured** — see +amendment A3. All 24 responses were scanned; this is the only affected cell. + +**4. The repair-effort minutes are contaminated and are an upper bound.** The eleven cells were +repaired in parallel (amendment A2.1) and competed for one 8-core machine while each ran Maven +repeatedly; one cell recorded 24.7 wall-clock minutes for a build that worked for 5.6 seconds. +Use the **fix counts and categories** in `fix-log.csv`, which no scheduler can distort. Amendment +A4 has the full self-assessment. + +## What happened to these tests afterwards + +Six of the repaired corpus-B classes were **adopted into `modern/src/test`** +([ADR-0011](../../../docs/adr/0011-adopting-generated-tests.md)). **The artifacts in this +directory are immutable and were not touched by that** — the adopted files are copies with a +provenance header. If they diverge later, this directory still records exactly what the models +produced. diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/measurements-repaired.csv b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/measurements-repaired.csv new file mode 100644 index 0000000..f1d190f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/measurements-repaired.csv @@ -0,0 +1,7 @@ +unit,classUnderTest,compile,testsRun,failures,errors,lineCovered,lineMissed,branchCovered,branchMissed,mutationsGenerated,mutationsKilled +s1-werkstattservice,at.werkstatt.crm.service.WerkstattService,NO_CODE,0,0,0,0,0,0,0,0,0 +s2-auftragcontroller,at.werkstatt.crm.controller.AuftragController,OK,12,0,0,19,0,2,0,13,13 +s2-kundencontroller,at.werkstatt.crm.controller.KundenController,OK,14,0,0,19,0,6,0,17,17 +s2-rechnungcontroller,at.werkstatt.crm.controller.RechnungController,OK,9,0,0,12,0,2,0,8,8 +s3-admincontroller,at.werkstatt.crm.controller.AdminController,OK,6,0,0,17,0,0,0,2,2 +s4-rechnung,at.werkstatt.crm.model.Rechnung,FAILED,0,0,0,0,0,0,0,0,0 diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt new file mode 100644 index 0000000..d737931 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt @@ -0,0 +1,14 @@ +ABANDONED — 0 repair minutes, no fix-log rows. + +The Phase-A artifact of this cell is `as-generated/EXTRACTION-FAILED.txt`, whose entire +content is the literal string `null`: the call stopped with finish_reason=length after +spending its whole 16 000-token output budget on reasoning tokens, so the assistant +message content was JSON null (see amendment A1). There is no generated code here to +repair. + +Per amendment A2.3 the cell is recorded as ABANDONED at zero minutes and stays NO_CODE +after repair. Writing a test class from scratch would be the repairer GENERATING tests, +which is precisely what Phase B is not (A2.2). + +Read this as an UNREPAIRABLE cell, not a cheap one. It must never be averaged into a +mean repair time — that would make a model look better the more completely it failed. diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..694cced --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..5175264 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,192 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @10db82ae (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AuftragControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +log4j:WARN Please initialize the log4j system properly. +log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.227 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:18:48 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:18:48 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:18:48 AM PIT >> INFO : Sending 1 test classes to minion +11:18:48 AM PIT >> INFO : Sent tests to minion +11:18:48 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:18:49 AM PIT >> INFO : MINION : log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +11:18:49 AM PIT >> INFO : MINION : log4j:WARN Please initialize the log4j system properly. +11:18:49 AM PIT >> INFO : MINION : log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +/-\|/-\|/-\|11:18:49 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:18:49 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:18:49 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_erfolgreich_gibtOkMitNeuemAuftragZurueck()]) took 564 ms +11:18:49 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_serviceWirftException_gibt500MitFehlermeldungZurueck()]) covered 7 blocks +11:18:49 AM PIT >> INFO : Created 1 mutation test units +/11:18:51 AM PIT >> INFO : Completed in 2 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 10 Killed 10 (100%) +> KILLED 10 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 2 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_erfolgreich_gibtOkMitNeuemAuftragZurueck()]) took 564 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_serviceWirftException_gibt500MitFehlermeldungZurueck()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 19/19 (100%) +>> 1 tests examined +>> Generated 13 mutations Killed 13 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 14 tests (1.08 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 7.623 s +[INFO] Finished at: 2026-08-02T11:18:51+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html new file mode 100644 index 0000000..08135cd --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html @@ -0,0 +1,1338 @@ + + + + + + + + + +

AuftragController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.List;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +16 + + + + + + +
+ +17 + + + + + + +
import at.werkstatt.crm.model.Auftrag;
+ +18 + + + + + + +
import at.werkstatt.crm.model.AuftragPosition;
+ +19 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +20 + + + + + + +
+ +21 + + + + + + +
@RestController
+ +22 + + + + + + +
@RequestMapping("/api/auftraege")
+ +23 + + + + + + +
public class AuftragController {
+ +24 + + + + + + +
+ +25 + + + + + + +
	@Autowired
+ +26 + + + + + + +
	private WerkstattService werkstattService;
+ +27 + + + + + + +
+ +28 + + + + + + +
	@GetMapping
+ +29 + + + + + + +
	public List<Auftrag> liste(@RequestParam(value = "status", required = false) String status) {
+ +30 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED
+ +
+
+
		return werkstattService.getAuftraege(status);
+ +31 + + + + + + +
	}
+ +32 + + + + + + +
+ +33 + + + + + + +
	@GetMapping("/{id}")
+ +34 + + + + + + +
	public ResponseEntity<Auftrag> einzeln(@PathVariable long id) {
+ +35 + + + + + + +
		Auftrag auftrag = werkstattService.getAuftrag(id);
+ +36 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
		if (auftrag == null) {
+ +37 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
			return ResponseEntity.notFound().build();
+ +38 + + + + + + +
		}
+ +39 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
		return ResponseEntity.ok(auftrag);
+ +40 + + + + + + +
	}
+ +41 + + + + + + +
+ +42 + + + + + + +
	@PostMapping
+ +43 + + + + + + +
	public ResponseEntity<?> anlegen(@RequestBody Auftrag auftrag) {
+ +44 + + + + + + +
		try {
+ +45 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.neuerAuftrag(auftrag));
+ +46 + + + + + + +
		} catch (Exception e) {
+ +47 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +48 + + + + + + +
		}
+ +49 + + + + + + +
	}
+ +50 + + + + + + +
+ +51 + + + + + + +
	// Statuswechsel als PUT mit Query-Parameter, hat sich so eingebuergert
+ +52 + + + + + + +
	@PutMapping("/{id}/status")
+ +53 + + + + + + +
	public ResponseEntity<?> status(@PathVariable long id, @RequestParam("neu") String neuerStatus) {
+ +54 + + + + + + +
		try {
+ +55 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.setzeStatus(id, neuerStatus));
+ +56 + + + + + + +
		} catch (Exception e) {
+ +57 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +58 + + + + + + +
		}
+ +59 + + + + + + +
	}
+ +60 + + + + + + +
+ +61 + + + + + + +
	@PostMapping("/{id}/positionen")
+ +62 + + + + + + +
	public ResponseEntity<?> position(@PathVariable long id, @RequestBody AuftragPosition position) {
+ +63 + + + + + + +
		try {
+ +64 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.neuePosition(id, position));
+ +65 + + + + + + +
		} catch (Exception e) {
+ +66 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +67 + + + + + + +
		}
+ +68 + + + + + + +
	}
+ +69 + + + + + + +
+ +70 + + + + + + +
	@DeleteMapping("/positionen/{positionId}")
+ +71 + + + + + + +
	public ResponseEntity<?> positionLoeschen(@PathVariable long positionId) {
+ +72 + + + + + + +
		try {
+ +73 + + +1 + +1. positionLoeschen : removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED
+ +
+
+
			werkstattService.loeschePosition(positionId);
+ +74 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
			return ResponseEntity.ok().build();
+ +75 + + + + + + +
		} catch (Exception e) {
+ +76 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +77 + + + + + + +
		}
+ +78 + + + + + + +
	}
+ +79 + + + + + + +
+ +80 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_gibtListeVomServiceZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED + +

36 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_gefunden_gibtOkMitAuftragZurueck()]
negated conditional → KILLED + +

37 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibtNotFoundZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_gefunden_gibtOkMitAuftragZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

45 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_erfolgreich_gibtOkMitNeuemAuftragZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

47 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_serviceWirftException_gibt500MitFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

55 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_erfolgreich_gibtOkMitAktualisiertemAuftragZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

57 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_serviceWirftException_gibt500MitFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

64 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_erfolgreich_gibtOkMitNeuerPositionZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

66 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_serviceWirftException_gibt500MitFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

73 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_erfolgreich_gibtOkOhneBodyZurueck()]
removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED + +

74 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_erfolgreich_gibtOkOhneBodyZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

76 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_serviceWirftException_gibt500MitFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_serviceWirftException_gibt500MitFehlermeldungZurueck()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_erfolgreich_gibtOkMitNeuerPositionZurueck()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_serviceWirftException_gibt500MitFehlermeldungZurueck()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_erfolgreich_gibtOkMitAktualisiertemAuftragZurueck()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_mitNullStatus_wirdDurchgereicht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_gibtListeVomServiceZurueck()] (12 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibtNotFoundZurueck()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_erfolgreich_gibtOkMitNeuemAuftragZurueck()] (564 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_gefunden_gibtOkMitAuftragZurueck()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_erfolgreich_gibtOkOhneBodyZurueck()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_serviceWirftException_gibt500MitFehlermeldungZurueck()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_serviceWirftException_gibt500MitFehlermeldungZurueck()] (1 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..1609538 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
100%
13/13
100%
13/13
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AuftragController.java
100%
19/19
100%
13/13
100%
13/13
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..6b12824 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
100%
13/13
100%
13/13
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
19/19
100%
13/13
100%
13/13
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..8deba4e --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,16 @@ + + +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;45org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_erfolgreich_gibtOkMitNeuemAuftragZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;47org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_serviceWirftException_gibt500MitFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;36org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_gefunden_gibtOkMitAuftragZurueck()]negated conditional +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;37org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibtNotFoundZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_gefunden_gibtOkMitAuftragZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_gibtListeVomServiceZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;64org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_erfolgreich_gibtOkMitNeuerPositionZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;66org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_serviceWirftException_gibt500MitFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;73org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_erfolgreich_gibtOkOhneBodyZurueck()]removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_erfolgreich_gibtOkOhneBodyZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;76org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_serviceWirftException_gibt500MitFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;55org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_erfolgreich_gibtOkMitAktualisiertemAuftragZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;57org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_serviceWirftException_gibt500MitFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml new file mode 100644 index 0000000..851de43 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt new file mode 100644 index 0000000..048695c --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AuftragControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.227 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java new file mode 100644 index 0000000..0673c69 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java @@ -0,0 +1,193 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.ArgumentMatchers.isNull; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.test.util.ReflectionTestUtils; + +import at.werkstatt.crm.controller.AuftragController; +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.service.WerkstattService; + +@ExtendWith(MockitoExtension.class) +class AuftragControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private AuftragController controller; + + @BeforeEach + void setUp() { + controller = new AuftragController(); + ReflectionTestUtils.setField(controller, "werkstattService", werkstattService); + } + + // ---------- liste ---------- + + @Test + void liste_gibtListeVomServiceZurueck() { + Auftrag a1 = new Auftrag(); + Auftrag a2 = new Auftrag(); + List erwartet = Arrays.asList(a1, a2); + when(werkstattService.getAuftraege("IN_ARBEIT")).thenReturn(erwartet); + + List ergebnis = controller.liste("IN_ARBEIT"); + + assertThat(ergebnis).isSameAs(erwartet); + verify(werkstattService).getAuftraege("IN_ARBEIT"); + } + + @Test + void liste_mitNullStatus_wirdDurchgereicht() { + when(werkstattService.getAuftraege(isNull())).thenReturn(Collections.emptyList()); + + List ergebnis = controller.liste(null); + + assertThat(ergebnis).isEmpty(); + verify(werkstattService).getAuftraege(isNull()); + } + + // ---------- einzeln ---------- + + @Test + void einzeln_gefunden_gibtOkMitAuftragZurueck() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(5L); + when(werkstattService.getAuftrag(5L)).thenReturn(auftrag); + + ResponseEntity response = controller.einzeln(5L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isSameAs(auftrag); + } + + @Test + void einzeln_nichtGefunden_gibtNotFoundZurueck() { + when(werkstattService.getAuftrag(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); + assertThat(response.getBody()).isNull(); + } + + // ---------- anlegen ---------- + + @Test + void anlegen_erfolgreich_gibtOkMitNeuemAuftragZurueck() { + Auftrag eingabe = new Auftrag(); + Auftrag gespeichert = new Auftrag(); + gespeichert.setId(1L); + when(werkstattService.neuerAuftrag(eingabe)).thenReturn(gespeichert); + + ResponseEntity response = controller.anlegen(eingabe); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isSameAs(gespeichert); + } + + @Test + void anlegen_serviceWirftException_gibt500MitFehlermeldungZurueck() { + Auftrag eingabe = new Auftrag(); + when(werkstattService.neuerAuftrag(eingabe)).thenThrow(new RuntimeException("Fehler beim Anlegen")); + + ResponseEntity response = controller.anlegen(eingabe); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Fehler beim Anlegen"); + } + + // ---------- status ---------- + + @Test + void status_erfolgreich_gibtOkMitAktualisiertemAuftragZurueck() { + Auftrag aktualisiert = new Auftrag(); + aktualisiert.setStatus(Auftrag.STATUS_FERTIG); + when(werkstattService.setzeStatus(3L, Auftrag.STATUS_FERTIG)).thenReturn(aktualisiert); + + ResponseEntity response = controller.status(3L, Auftrag.STATUS_FERTIG); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isSameAs(aktualisiert); + } + + @Test + void status_serviceWirftException_gibt500MitFehlermeldungZurueck() { + when(werkstattService.setzeStatus(anyLong(), anyString())) + .thenThrow(new RuntimeException("Ungueltiger Status")); + + ResponseEntity response = controller.status(3L, "UNGUELTIG"); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Ungueltiger Status"); + } + + // ---------- position ---------- + + @Test + void position_erfolgreich_gibtOkMitNeuerPositionZurueck() { + AuftragPosition eingabe = new AuftragPosition(); + AuftragPosition gespeichert = new AuftragPosition(); + gespeichert.setId(7L); + when(werkstattService.neuePosition(eq(2L), eq(eingabe))).thenReturn(gespeichert); + + ResponseEntity response = controller.position(2L, eingabe); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isSameAs(gespeichert); + } + + @Test + void position_serviceWirftException_gibt500MitFehlermeldungZurueck() { + AuftragPosition eingabe = new AuftragPosition(); + when(werkstattService.neuePosition(anyLong(), any(AuftragPosition.class))) + .thenThrow(new RuntimeException("Auftrag nicht gefunden")); + + ResponseEntity response = controller.position(2L, eingabe); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Auftrag nicht gefunden"); + } + + // ---------- positionLoeschen ---------- + + @Test + void positionLoeschen_erfolgreich_gibtOkOhneBodyZurueck() { + ResponseEntity response = controller.positionLoeschen(4L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isNull(); + verify(werkstattService, times(1)).loeschePosition(4L); + } + + @Test + void positionLoeschen_serviceWirftException_gibt500MitFehlermeldungZurueck() { + doThrow(new RuntimeException("Position nicht gefunden")).when(werkstattService).loeschePosition(4L); + + ResponseEntity response = controller.positionLoeschen(4L); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Position nicht gefunden"); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..142a3c2 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..009c733 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/maven-test.log @@ -0,0 +1,198 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @501edcf1 (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.KundenControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +log4j:WARN Please initialize the log4j system properly. +log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.299 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:18:57 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:18:57 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:18:57 AM PIT >> INFO : Sending 1 test classes to minion +11:18:57 AM PIT >> INFO : Sent tests to minion +11:18:57 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:18:58 AM PIT >> INFO : MINION : log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +11:18:58 AM PIT >> INFO : MINION : log4j:WARN Please initialize the log4j system properly. +11:18:58 AM PIT >> INFO : MINION : log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +/-\|/-\|/-\|/-11:18:58 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:18:58 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:18:58 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_suchtKunden()]) took 675 ms +11:18:58 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriffMitLeerzeichen_trimmtVorSuche()]) covered 9 blocks +11:18:58 AM PIT >> INFO : Created 1 mutation test units +/11:19:00 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 7 Killed 7 (100%) +> KILLED 7 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_suchtKunden()]) took 675 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriffMitLeerzeichen_trimmtVorSuche()]) covered 9 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 19/19 (100%) +>> 1 tests examined +>> Generated 17 mutations Killed 17 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 18 tests (1.06 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 8.269 s +[INFO] Finished at: 2026-08-02T11:19:00+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html new file mode 100644 index 0000000..900c8c8 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html @@ -0,0 +1,1340 @@ + + + + + + + + + +

KundenController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.List;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +16 + + + + + + +
+ +17 + + + + + + +
import at.werkstatt.crm.model.Fahrzeug;
+ +18 + + + + + + +
import at.werkstatt.crm.model.Kunde;
+ +19 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +20 + + + + + + +
+ +21 + + + + + + +
@RestController
+ +22 + + + + + + +
@RequestMapping("/api/kunden")
+ +23 + + + + + + +
public class KundenController {
+ +24 + + + + + + +
+ +25 + + + + + + +
	@Autowired
+ +26 + + + + + + +
	private WerkstattService werkstattService;
+ +27 + + + + + + +
+ +28 + + + + + + +
	@GetMapping
+ +29 + + + + + + +
	public List<Kunde> liste(@RequestParam(value = "suche", required = false) String suche) {
+ +30 + + +3 + +1. liste : negated conditional → KILLED
+2. liste : changed conditional boundary → KILLED
+3. liste : negated conditional → KILLED
+ +
+
+
		if (suche != null && suche.trim().length() > 0) {
+ +31 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
			return werkstattService.sucheKunden(suche.trim());
+ +32 + + + + + + +
		}
+ +33 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
		return werkstattService.getAlleKunden();
+ +34 + + + + + + +
	}
+ +35 + + + + + + +
+ +36 + + + + + + +
	@GetMapping("/{id}")
+ +37 + + + + + + +
	public ResponseEntity<Kunde> einzeln(@PathVariable long id) {
+ +38 + + + + + + +
		Kunde kunde = werkstattService.getKunde(id);
+ +39 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
		if (kunde == null) {
+ +40 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
			return ResponseEntity.notFound().build();
+ +41 + + + + + + +
		}
+ +42 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
		return ResponseEntity.ok(kunde);
+ +43 + + + + + + +
	}
+ +44 + + + + + + +
+ +45 + + + + + + +
	@GetMapping("/{id}/fahrzeuge")
+ +46 + + + + + + +
	public List<Fahrzeug> fahrzeuge(@PathVariable long id) {
+ +47 + + +1 + +1. fahrzeuge : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED
+ +
+
+
		return werkstattService.getFahrzeugeZuKunde(id);
+ +48 + + + + + + +
	}
+ +49 + + + + + + +
+ +50 + + + + + + +
	@PostMapping
+ +51 + + + + + + +
	public Kunde anlegen(@RequestBody Kunde kunde) {
+ +52 + + + + + + +
		// keine Validierung, das Frontend schickt schon das Richtige
+ +53 + + +1 + +1. anlegen : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
		kunde.setId(null);
+ +54 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED
+ +
+
+
		return werkstattService.speichereKunde(kunde);
+ +55 + + + + + + +
	}
+ +56 + + + + + + +
+ +57 + + + + + + +
	@PutMapping("/{id}")
+ +58 + + + + + + +
	public ResponseEntity<?> aendern(@PathVariable long id, @RequestBody Kunde kunde) {
+ +59 + + + + + + +
		try {
+ +60 + + +1 + +1. aendern : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
			kunde.setId(id);
+ +61 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.speichereKunde(kunde));
+ +62 + + + + + + +
		} catch (Exception e) {
+ +63 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +64 + + + + + + +
		}
+ +65 + + + + + + +
	}
+ +66 + + + + + + +
+ +67 + + + + + + +
	@DeleteMapping("/{id}")
+ +68 + + + + + + +
	public ResponseEntity<?> loeschen(@PathVariable long id) {
+ +69 + + + + + + +
		try {
+ +70 + + +1 + +1. loeschen : removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED
+ +
+
+
			werkstattService.loescheKunde(id);
+ +71 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
			return ResponseEntity.ok().build();
+ +72 + + + + + + +
		} catch (Exception e) {
+ +73 + + + + + + +
			// Meldung 1:1 zum Client, hilft beim Support-Telefonat
+ +74 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +75 + + + + + + +
		}
+ +76 + + + + + + +
	}
+ +77 + + + + + + +
+ +78 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()]
negated conditional → KILLED +

2.2
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()]
changed conditional boundary → KILLED +

3.3
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_ohneSuche_gibtAlleKundenZurueck()]
negated conditional → KILLED + +

31 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriffMitLeerzeichen_trimmtVorSuche()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

33 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeGefunden_gibt200MitKundeZurueck()]
negated conditional → KILLED + +

40 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtGefunden_gibt404Zurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

42 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeGefunden_gibt200MitKundeZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

47 + + + +

1.1
Location : fahrzeuge
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_gibtFahrzeugeZuKundeZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED + +

53 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

54 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED + +

60 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibt200MitGespeichertemKundeZurueck()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

61 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibt200MitGespeichertemKundeZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

63 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_wirftException_gibt500MitMeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

70 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_wirftException_gibt500MitMeldungZurueck()]
removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED + +

71 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_erfolgreich_gibt200Zurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

74 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_wirftException_gibt500MitMeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriffMitLeerzeichen_trimmtVorSuche()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstring_gibtAlleKundenZurueck()] (4 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_suchtKunden()] (675 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibt200MitGespeichertemKundeZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_wirftException_gibt500MitMeldungZurueck()] (14 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_wirftException_gibt500MitMeldungZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_erfolgreich_gibt200Zurueck()] (4 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_ohneSuche_gibtAlleKundenZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtGefunden_gibt404Zurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeGefunden_gibt200MitKundeZurueck()] (1 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_gibtFahrzeugeZuKundeZurueck()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_leereListe()] (3 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..c8b332f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
100%
17/17
100%
17/17
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
KundenController.java
100%
19/19
100%
17/17
100%
17/17
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..6c2ec8f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
100%
17/17
100%
17/17
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
19/19
100%
17/17
100%
17/17
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..9fc141a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,20 @@ + + +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;60org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator61at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibt200MitGespeichertemKundeZurueck()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;61org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator154at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibt200MitGespeichertemKundeZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;63org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator278at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_wirftException_gibt500MitMeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;53org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator50at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;54org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator122at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeGefunden_gibt200MitKundeZurueck()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;40org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtGefunden_gibt404Zurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;42org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeGefunden_gibt200MitKundeZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllerfahrzeuge(J)Ljava/util/List;47org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_gibtFahrzeugeZuKundeZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()]changed conditional boundary +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator40at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_ohneSuche_gibtAlleKundenZurueck()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;31org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator166at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriffMitLeerzeichen_trimmtVorSuche()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;33org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator238at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;70org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_wirftException_gibt500MitMeldungZurueck()]removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;71org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_erfolgreich_gibt200Zurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_wirftException_gibt500MitMeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml new file mode 100644 index 0000000..9a6e767 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt new file mode 100644 index 0000000..3eb1a24 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.KundenControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.299 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java new file mode 100644 index 0000000..a7de477 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java @@ -0,0 +1,228 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.ResponseEntity; +import org.springframework.test.util.ReflectionTestUtils; + +import at.werkstatt.crm.controller.KundenController; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.service.WerkstattService; + +@ExtendWith(MockitoExtension.class) +class KundenControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private KundenController kundenController; + + @BeforeEach + void setUp() { + kundenController = new KundenController(); + ReflectionTestUtils.setField(kundenController, "werkstattService", werkstattService); + } + + // ---- liste() ---- + + @Test + void liste_ohneSuche_gibtAlleKundenZurueck() { + Kunde k1 = new Kunde(); + Kunde k2 = new Kunde(); + List alle = Arrays.asList(k1, k2); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = kundenController.liste(null); + + assertThat(result).isEqualTo(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(any()); + } + + @Test + void liste_mitLeerstring_gibtAlleKundenZurueck() { + List alle = Collections.singletonList(new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = kundenController.liste(" "); + + assertThat(result).isEqualTo(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(any()); + } + + @Test + void liste_mitLeerstringOhneWhitespace_gibtAlleKundenZurueck() { + List alle = Collections.singletonList(new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = kundenController.liste(""); + + assertThat(result).isEqualTo(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(any()); + } + + @Test + void liste_mitSuchbegriff_suchtKunden() { + List gefunden = Collections.singletonList(new Kunde()); + when(werkstattService.sucheKunden("Mustermann")).thenReturn(gefunden); + + List result = kundenController.liste("Mustermann"); + + assertThat(result).isEqualTo(gefunden); + verify(werkstattService).sucheKunden("Mustermann"); + verify(werkstattService, never()).getAlleKunden(); + } + + @Test + void liste_mitSuchbegriffMitLeerzeichen_trimmtVorSuche() { + List gefunden = Collections.singletonList(new Kunde()); + when(werkstattService.sucheKunden("Mustermann")).thenReturn(gefunden); + + List result = kundenController.liste(" Mustermann "); + + assertThat(result).isEqualTo(gefunden); + verify(werkstattService).sucheKunden("Mustermann"); + verify(werkstattService, never()).getAlleKunden(); + } + + // ---- einzeln() ---- + + @Test + void einzeln_kundeGefunden_gibt200MitKundeZurueck() { + Kunde kunde = new Kunde(); + kunde.setId(5L); + when(werkstattService.getKunde(5L)).thenReturn(kunde); + + ResponseEntity response = kundenController.einzeln(5L); + + assertThat(response.getStatusCodeValue()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(kunde); + } + + @Test + void einzeln_kundeNichtGefunden_gibt404Zurueck() { + when(werkstattService.getKunde(99L)).thenReturn(null); + + ResponseEntity response = kundenController.einzeln(99L); + + assertThat(response.getStatusCodeValue()).isEqualTo(404); + assertThat(response.getBody()).isNull(); + } + + // ---- fahrzeuge() ---- + + @Test + void fahrzeuge_gibtFahrzeugeZuKundeZurueck() { + Fahrzeug f1 = new Fahrzeug(); + List fahrzeuge = Collections.singletonList(f1); + when(werkstattService.getFahrzeugeZuKunde(3L)).thenReturn(fahrzeuge); + + List result = kundenController.fahrzeuge(3L); + + assertThat(result).isEqualTo(fahrzeuge); + verify(werkstattService).getFahrzeugeZuKunde(3L); + } + + @Test + void fahrzeuge_leereListe() { + when(werkstattService.getFahrzeugeZuKunde(7L)).thenReturn(Collections.emptyList()); + + List result = kundenController.fahrzeuge(7L); + + assertThat(result).isEmpty(); + } + + // ---- anlegen() ---- + + @Test + void anlegen_setztIdAufNullUndSpeichert() { + Kunde eingabe = new Kunde(); + eingabe.setId(123L); + eingabe.setNachname("Test"); + + Kunde gespeichert = new Kunde(); + gespeichert.setId(1L); + gespeichert.setNachname("Test"); + + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(gespeichert); + + Kunde result = kundenController.anlegen(eingabe); + + assertThat(eingabe.getId()).isNull(); + assertThat(result).isEqualTo(gespeichert); + verify(werkstattService).speichereKunde(eingabe); + } + + // ---- aendern() ---- + + @Test + void aendern_erfolgreich_gibt200MitGespeichertemKundeZurueck() { + Kunde eingabe = new Kunde(); + Kunde gespeichert = new Kunde(); + gespeichert.setId(10L); + + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(gespeichert); + + ResponseEntity response = kundenController.aendern(10L, eingabe); + + assertThat(eingabe.getId()).isEqualTo(10L); + assertThat(response.getStatusCodeValue()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(gespeichert); + verify(werkstattService).speichereKunde(eingabe); + } + + @Test + void aendern_wirftException_gibt500MitMeldungZurueck() { + Kunde eingabe = new Kunde(); + when(werkstattService.speichereKunde(any(Kunde.class))) + .thenThrow(new RuntimeException("Fehler beim Speichern")); + + ResponseEntity response = kundenController.aendern(5L, eingabe); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Fehler beim Speichern"); + } + + // ---- loeschen() ---- + + @Test + void loeschen_erfolgreich_gibt200Zurueck() { + doNothing().when(werkstattService).loescheKunde(4L); + + ResponseEntity response = kundenController.loeschen(4L); + + assertThat(response.getStatusCodeValue()).isEqualTo(200); + verify(werkstattService).loescheKunde(4L); + } + + @Test + void loeschen_wirftException_gibt500MitMeldungZurueck() { + doThrow(new RuntimeException("Kunde hat noch Fahrzeuge")).when(werkstattService).loescheKunde(8L); + + ResponseEntity response = kundenController.loeschen(8L); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Kunde hat noch Fahrzeuge"); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..1647002 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..59e459d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,186 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @27c86f2d (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +log4j:WARN Please initialize the log4j system properly. +log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.402 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:19:06 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:19:06 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:19:06 AM PIT >> INFO : Sending 1 test classes to minion +11:19:06 AM PIT >> INFO : Sent tests to minion +11:19:07 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:19:07 AM PIT >> INFO : MINION : log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +11:19:07 AM PIT >> INFO : MINION : log4j:WARN Please initialize the log4j system properly. +11:19:07 AM PIT >> INFO : MINION : log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +/-\|/-\|/11:19:07 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:19:07 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:19:07 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exception_returns500WithMessage()]) took 677 ms +11:19:07 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exceptionWithNullMessage_returns500WithNullBody()]) covered 7 blocks +11:19:07 AM PIT >> INFO : Created 1 mutation test units +/11:19:09 AM PIT >> INFO : Completed in 2 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 6 Killed 6 (100%) +> KILLED 6 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 2 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exception_returns500WithMessage()]) took 677 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exceptionWithNullMessage_returns500WithNullBody()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 12/12 (100%) +>> 1 tests examined +>> Generated 8 mutations Killed 8 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 9 tests (1.12 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 8.149 s +[INFO] Finished at: 2026-08-02T11:19:09+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html new file mode 100644 index 0000000..50d8030 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html @@ -0,0 +1,937 @@ + + + + + + + + + +

RechnungController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.List;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +13 + + + + + + +
+ +14 + + + + + + +
import at.werkstatt.crm.model.Rechnung;
+ +15 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +16 + + + + + + +
+ +17 + + + + + + +
@RestController
+ +18 + + + + + + +
@RequestMapping("/api/rechnungen")
+ +19 + + + + + + +
public class RechnungController {
+ +20 + + + + + + +
+ +21 + + + + + + +
	@Autowired
+ +22 + + + + + + +
	private WerkstattService werkstattService;
+ +23 + + + + + + +
+ +24 + + + + + + +
	@GetMapping
+ +25 + + + + + + +
	public List<Rechnung> liste() {
+ +26 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED
+ +
+
+
		return werkstattService.getAlleRechnungen();
+ +27 + + + + + + +
	}
+ +28 + + + + + + +
+ +29 + + + + + + +
	@GetMapping("/{id}")
+ +30 + + + + + + +
	public ResponseEntity<Rechnung> einzeln(@PathVariable long id) {
+ +31 + + + + + + +
		Rechnung rechnung = werkstattService.getRechnung(id);
+ +32 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
		if (rechnung == null) {
+ +33 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
			return ResponseEntity.notFound().build();
+ +34 + + + + + + +
		}
+ +35 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
		return ResponseEntity.ok(rechnung);
+ +36 + + + + + + +
	}
+ +37 + + + + + + +
+ +38 + + + + + + +
	@PostMapping("/auftrag/{auftragId}")
+ +39 + + + + + + +
	public ResponseEntity<?> erstellen(@PathVariable long auftragId) {
+ +40 + + + + + + +
		try {
+ +41 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.erstelleRechnung(auftragId));
+ +42 + + + + + + +
		} catch (Exception e) {
+ +43 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +44 + + + + + + +
		}
+ +45 + + + + + + +
	}
+ +46 + + + + + + +
+ +47 + + + + + + +
	@PutMapping("/{id}/bezahlt")
+ +48 + + + + + + +
	public ResponseEntity<?> bezahlt(@PathVariable long id) {
+ +49 + + + + + + +
		try {
+ +50 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.setzeBezahlt(id));
+ +51 + + + + + + +
		} catch (Exception e) {
+ +52 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +53 + + + + + + +
		}
+ +54 + + + + + + +
	}
+ +55 + + + + + + +
+ +56 + + + + + + +
}

Mutations

26 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED + +

32 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_notFound_returnsNotFound()]
negated conditional → KILLED + +

33 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_notFound_returnsNotFound()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

35 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_found_returnsOk()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

41 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_success_returnsOk()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

43 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_exception_returns500WithMessage()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

50 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_success_returnsOk()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

52 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exceptionWithNullMessage_returns500WithNullBody()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_success_returnsOk()] (2 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsEmptyList()] (2 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()] (11 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_notFound_returnsNotFound()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_found_returnsOk()] (2 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_success_returnsOk()] (5 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exceptionWithNullMessage_returns500WithNullBody()] (3 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exception_returns500WithMessage()] (677 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_exception_returns500WithMessage()] (2 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..1b3de81 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
12/12
100%
8/8
100%
8/8
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
RechnungController.java
100%
12/12
100%
8/8
100%
8/8
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..6c44f95 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
12/12
100%
8/8
100%
8/8
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
12/12
100%
8/8
100%
8/8
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..49ea620 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,11 @@ + + +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;50org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_success_returnsOk()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;52org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_exceptionWithNullMessage_returns500WithNullBody()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;32org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_notFound_returnsNotFound()]negated conditional +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;33org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_notFound_returnsNotFound()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;35org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_found_returnsOk()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;41org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_success_returnsOk()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;43org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_exception_returns500WithMessage()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerliste()Ljava/util/List;26org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator61at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml new file mode 100644 index 0000000..4891e26 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt new file mode 100644 index 0000000..edc81f3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.402 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java new file mode 100644 index 0000000..89875f6 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java @@ -0,0 +1,141 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.ResponseEntity; +import org.springframework.test.util.ReflectionTestUtils; + +import at.werkstatt.crm.controller.RechnungController; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; + +@ExtendWith(MockitoExtension.class) +class RechnungControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private RechnungController controller; + + @BeforeEach + void setUp() { + controller = new RechnungController(); + ReflectionTestUtils.setField(controller, "werkstattService", werkstattService); + } + + @Test + void liste_returnsAllRechnungen() { + Rechnung r1 = new Rechnung(); + r1.setId(1L); + Rechnung r2 = new Rechnung(); + r2.setId(2L); + List rechnungen = Arrays.asList(r1, r2); + when(werkstattService.getAlleRechnungen()).thenReturn(rechnungen); + + List result = controller.liste(); + + assertThat(result).hasSize(2).containsExactly(r1, r2); + verify(werkstattService, times(1)).getAlleRechnungen(); + } + + @Test + void liste_returnsEmptyList() { + when(werkstattService.getAlleRechnungen()).thenReturn(Collections.emptyList()); + + List result = controller.liste(); + + assertThat(result).isEmpty(); + } + + @Test + void einzeln_found_returnsOk() { + Rechnung r = new Rechnung(); + r.setId(5L); + when(werkstattService.getRechnung(5L)).thenReturn(r); + + ResponseEntity response = controller.einzeln(5L); + + assertThat(response.getStatusCodeValue()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(r); + } + + @Test + void einzeln_notFound_returnsNotFound() { + when(werkstattService.getRechnung(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCodeValue()).isEqualTo(404); + assertThat(response.getBody()).isNull(); + } + + @Test + void erstellen_success_returnsOk() { + Rechnung r = new Rechnung(); + r.setId(10L); + r.setAuftragId(20L); + when(werkstattService.erstelleRechnung(20L)).thenReturn(r); + + ResponseEntity response = controller.erstellen(20L); + + assertThat(response.getStatusCodeValue()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(r); + } + + @Test + void erstellen_exception_returns500WithMessage() { + when(werkstattService.erstelleRechnung(anyLong())).thenThrow(new RuntimeException("Fehler beim Erstellen")); + + ResponseEntity response = controller.erstellen(30L); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Fehler beim Erstellen"); + } + + @Test + void bezahlt_success_returnsOk() { + Rechnung r = new Rechnung(); + r.setId(40L); + r.setBezahlt(true); + when(werkstattService.setzeBezahlt(40L)).thenReturn(r); + + ResponseEntity response = controller.bezahlt(40L); + + assertThat(response.getStatusCodeValue()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(r); + } + + @Test + void bezahlt_exception_returns500WithMessage() { + when(werkstattService.setzeBezahlt(anyLong())).thenThrow(new RuntimeException("Rechnung nicht gefunden")); + + ResponseEntity response = controller.bezahlt(50L); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Rechnung nicht gefunden"); + } + + @Test + void bezahlt_exceptionWithNullMessage_returns500WithNullBody() { + when(werkstattService.setzeBezahlt(anyLong())).thenThrow(new RuntimeException()); + + ResponseEntity response = controller.bezahlt(60L); + + assertThat(response.getStatusCodeValue()).isEqualTo(500); + assertThat(response.getBody()).isNull(); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..a9a02bc --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..1a914f6 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/maven-test.log @@ -0,0 +1,174 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @10db82ae (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AdminControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +log4j:WARN Please initialize the log4j system properly. +log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.726 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:19:16 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:19:16 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:19:16 AM PIT >> INFO : Sending 1 test classes to minion +11:19:16 AM PIT >> INFO : Sent tests to minion +11:19:17 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:19:17 AM PIT >> INFO : MINION : log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +11:19:17 AM PIT >> INFO : MINION : log4j:WARN Please initialize the log4j system properly. +11:19:17 AM PIT >> INFO : MINION : log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +/-\|/-11:19:17 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:19:17 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:19:17 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_withNullStatistik_producesNullJson()]) took 658 ms +11:19:17 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withNegativeAnzahl_stillFormatsMeldung()]) covered 16 blocks +11:19:17 AM PIT >> INFO : Created 1 mutation test units +/11:19:19 AM PIT >> INFO : Completed in 2 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 2 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_withNullStatistik_producesNullJson()]) took 658 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withNegativeAnzahl_stillFormatsMeldung()]) covered 16 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 17/17 (100%) +>> 1 tests examined +>> Generated 2 mutations Killed 2 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 2 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 8.851 s +[INFO] Finished at: 2026-08-02T11:19:19+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html new file mode 100644 index 0000000..d78ed27 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html @@ -0,0 +1,887 @@ + + + + + + + + + +

AdminController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.Map;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.beans.factory.annotation.Value;
+ +7 + + + + + + +
import org.springframework.stereotype.Controller;
+ +8 + + + + + + +
import org.springframework.ui.Model;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +11 + + + + + + +
+ +12 + + + + + + +
import com.google.gson.Gson;
+ +13 + + + + + + +
+ +14 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +15 + + + + + + +
+ +16 + + + + + + +
/**
+ +17 + + + + + + +
 * Alte Admin-Seite als JSP, stammt noch aus der Tomcat-Zeit vor Spring Boot.
+ +18 + + + + + + +
 * Wird nur vom Chef verwendet. Kein Login davor - die Seite kennt eh niemand.
+ +19 + + + + + + +
 */
+ +20 + + + + + + +
@Controller
+ +21 + + + + + + +
public class AdminController {
+ +22 + + + + + + +
+ +23 + + + + + + +
	@Autowired
+ +24 + + + + + + +
	private WerkstattService werkstattService;
+ +25 + + + + + + +
+ +26 + + + + + + +
	@Value("${werkstatt.firma.name}")
+ +27 + + + + + + +
	private String firmaName;
+ +28 + + + + + + +
+ +29 + + + + + + +
	@Value("${werkstatt.version:?}")
+ +30 + + + + + + +
	private String version;
+ +31 + + + + + + +
+ +32 + + + + + + +
	// gson statt jackson, weil das Beispiel damals aus einem Forum kopiert wurde
+ +33 + + + + + + +
	private Gson gson = new Gson();
+ +34 + + + + + + +
+ +35 + + + + + + +
	@GetMapping("/admin")
+ +36 + + + + + + +
	public String admin(Model model) {
+ +37 + + + + + + +
		Map<String, Object> statistik = werkstattService.getAdminStatistik();
+ +38 + + + + + + +
		model.addAttribute("statistik", statistik);
+ +39 + + + + + + +
		model.addAttribute("statistikJson", gson.toJson(statistik));
+ +40 + + + + + + +
		model.addAttribute("firmaName", firmaName);
+ +41 + + + + + + +
		model.addAttribute("version", version);
+ +42 + + + + + + +
		model.addAttribute("meldung", null);
+ +43 + + +1 + +1. admin : replaced return value with "" for at/werkstatt/crm/controller/AdminController::admin → KILLED
+ +
+
+
		return "admin";
+ +44 + + + + + + +
	}
+ +45 + + + + + + +
+ +46 + + + + + + +
	@PostMapping("/admin/bereinigen")
+ +47 + + + + + + +
	public String bereinigen(Model model) {
+ +48 + + + + + + +
		int anzahl = werkstattService.bereinigeStornierte();
+ +49 + + + + + + +
		Map<String, Object> statistik = werkstattService.getAdminStatistik();
+ +50 + + + + + + +
		model.addAttribute("statistik", statistik);
+ +51 + + + + + + +
		model.addAttribute("statistikJson", gson.toJson(statistik));
+ +52 + + + + + + +
		model.addAttribute("firmaName", firmaName);
+ +53 + + + + + + +
		model.addAttribute("version", version);
+ +54 + + + + + + +
		model.addAttribute("meldung", anzahl + " stornierte Aufträge wurden endgültig gelöscht.");
+ +55 + + +1 + +1. bereinigen : replaced return value with "" for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED
+ +
+
+
		return "admin";
+ +56 + + + + + + +
	}
+ +57 + + + + + + +
+ +58 + + + + + + +
}

Mutations

43 + + + +

1.1
Location : admin
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_withEmptyStatistik_stillPopulatesModelCorrectly()]
replaced return value with "" for at/werkstatt/crm/controller/AdminController::admin → KILLED + +

55 + + + +

1.1
Location : bereinigen
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withNegativeAnzahl_stillFormatsMeldung()]
replaced return value with "" for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_withEmptyStatistik_stillPopulatesModelCorrectly()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_happyPath_populatesModelAndReturnsAdminView()] (4 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_withNullStatistik_producesNullJson()] (658 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withNegativeAnzahl_stillFormatsMeldung()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withZeroDeletedEntries_setsMeldungWithZero()] (3 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_happyPath_withDeletedEntries_setsMeldungAndReturnsAdminView()] (11 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..a8b30f7 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
17/17
100%
2/2
100%
2/2
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AdminController.java
100%
17/17
100%
2/2
100%
2/2
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..5a1f43b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
17/17
100%
2/2
100%
2/2
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
17/17
100%
2/2
100%
2/2
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..af6a282 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,5 @@ + + +AdminController.javaat.werkstatt.crm.controller.AdminControlleradmin(Lorg/springframework/ui/Model;)Ljava/lang/String;43org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator507at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_withEmptyStatistik_stillPopulatesModelCorrectly()]replaced return value with "" for at/werkstatt/crm/controller/AdminController::admin +AdminController.javaat.werkstatt.crm.controller.AdminControllerbereinigen(Lorg/springframework/ui/Model;)Ljava/lang/String;55org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator6312at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withNegativeAnzahl_stillFormatsMeldung()]replaced return value with "" for at/werkstatt/crm/controller/AdminController::bereinigen + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml new file mode 100644 index 0000000..c542516 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt new file mode 100644 index 0000000..c164ddd --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AdminControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.726 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java new file mode 100644 index 0000000..7b658f4 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java @@ -0,0 +1,155 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.test.util.ReflectionTestUtils; +import org.springframework.ui.ExtendedModelMap; +import org.springframework.ui.Model; + +import com.google.gson.Gson; + +import at.werkstatt.crm.controller.AdminController; +import at.werkstatt.crm.service.WerkstattService; + +@ExtendWith(MockitoExtension.class) +class AdminControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private AdminController adminController; + + private final Gson gson = new Gson(); + + private static final String FIRMA_NAME = "Test Werkstatt GmbH"; + private static final String VERSION = "1.2.3"; + + @BeforeEach + void setUp() { + adminController = new AdminController(); + ReflectionTestUtils.setField(adminController, "werkstattService", werkstattService); + ReflectionTestUtils.setField(adminController, "firmaName", FIRMA_NAME); + ReflectionTestUtils.setField(adminController, "version", VERSION); + } + + // --------------------------------------------------------------- + // admin() + // --------------------------------------------------------------- + + @Test + void admin_happyPath_populatesModelAndReturnsAdminView() { + Map statistik = new LinkedHashMap<>(); + statistik.put("anzahlKunden", 42); + statistik.put("anzahlAuftraege", 7); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + Model model = new ExtendedModelMap(); + + String view = adminController.admin(model); + + assertThat(view).isEqualTo("admin"); + assertThat(model.asMap()).containsEntry("statistik", statistik); + assertThat(model.asMap()).containsEntry("statistikJson", gson.toJson(statistik)); + assertThat(model.asMap()).containsEntry("firmaName", FIRMA_NAME); + assertThat(model.asMap()).containsEntry("version", VERSION); + assertThat(model.asMap()).containsKey("meldung"); + assertThat(model.asMap().get("meldung")).isNull(); + + verify(werkstattService).getAdminStatistik(); + } + + @Test + void admin_withEmptyStatistik_stillPopulatesModelCorrectly() { + Map statistik = new HashMap<>(); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + Model model = new ExtendedModelMap(); + + String view = adminController.admin(model); + + assertThat(view).isEqualTo("admin"); + assertThat(model.asMap()).containsEntry("statistik", statistik); + assertThat(model.asMap()).containsEntry("statistikJson", "{}"); + assertThat(model.asMap()).containsEntry("firmaName", FIRMA_NAME); + assertThat(model.asMap()).containsEntry("version", VERSION); + } + + @Test + void admin_withNullStatistik_producesNullJson() { + when(werkstattService.getAdminStatistik()).thenReturn(null); + + Model model = new ExtendedModelMap(); + + String view = adminController.admin(model); + + assertThat(view).isEqualTo("admin"); + assertThat(model.asMap()).containsEntry("statistik", null); + assertThat(model.asMap()).containsEntry("statistikJson", "null"); + } + + // --------------------------------------------------------------- + // bereinigen() + // --------------------------------------------------------------- + + @Test + void bereinigen_happyPath_withDeletedEntries_setsMeldungAndReturnsAdminView() { + Map statistik = new LinkedHashMap<>(); + statistik.put("anzahlKunden", 5); + when(werkstattService.bereinigeStornierte()).thenReturn(3); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + Model model = new ExtendedModelMap(); + + String view = adminController.bereinigen(model); + + assertThat(view).isEqualTo("admin"); + assertThat(model.asMap()).containsEntry("statistik", statistik); + assertThat(model.asMap()).containsEntry("statistikJson", gson.toJson(statistik)); + assertThat(model.asMap()).containsEntry("firmaName", FIRMA_NAME); + assertThat(model.asMap()).containsEntry("version", VERSION); + assertThat(model.asMap()).containsEntry("meldung", "3 stornierte Aufträge wurden endgültig gelöscht."); + + verify(werkstattService).bereinigeStornierte(); + verify(werkstattService).getAdminStatistik(); + } + + @Test + void bereinigen_withZeroDeletedEntries_setsMeldungWithZero() { + Map statistik = new HashMap<>(); + when(werkstattService.bereinigeStornierte()).thenReturn(0); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + Model model = new ExtendedModelMap(); + + String view = adminController.bereinigen(model); + + assertThat(view).isEqualTo("admin"); + assertThat(model.asMap()).containsEntry("meldung", "0 stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_withNegativeAnzahl_stillFormatsMeldung() { + // Defensive edge case: even an unexpected negative value must be reflected verbatim. + Map statistik = new HashMap<>(); + when(werkstattService.bereinigeStornierte()).thenReturn(-1); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + Model model = new ExtendedModelMap(); + + String view = adminController.bereinigen(model); + + assertThat(view).isEqualTo("admin"); + assertThat(model.asMap()).containsEntry("meldung", "-1 stornierte Aufträge wurden endgültig gelöscht."); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/measurements/repaired/maven-test.log new file mode 100644 index 0000000..3702e0d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/measurements/repaired/maven-test.log @@ -0,0 +1,66 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @79ad8b2f (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 3.650 s +[INFO] Finished at: 2026-08-02T11:19:23+02:00 +[INFO] ------------------------------------------------------------------------ +[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.6:test (default-test) on project testbed-legacy: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/repaired/RechnungGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/repaired/RechnungGeneratedTest.java new file mode 100644 index 0000000..9d7555c --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/A/s4-rechnung/repaired/RechnungGeneratedTest.java @@ -0,0 +1,13 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.model.Rechnung; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.assertj.core.api.Assertions.assertThat; + +class RechnungGeneratedTest { + +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/measurements-repaired.csv b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/measurements-repaired.csv new file mode 100644 index 0000000..eb344c5 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/measurements-repaired.csv @@ -0,0 +1,7 @@ +unit,classUnderTest,compile,testsRun,failures,errors,lineCovered,lineMissed,branchCovered,branchMissed,mutationsGenerated,mutationsKilled +s1-werkstattservice,at.werkstatt.crm.service.WerkstattService,NO_CODE,0,0,0,0,0,0,0,0,0 +s2-auftragcontroller,at.werkstatt.crm.controller.AuftragController,OK,13,0,0,21,0,2,0,13,13 +s2-kundencontroller,at.werkstatt.crm.controller.KundenController,OK,13,0,0,21,0,6,0,17,17 +s2-rechnungcontroller,at.werkstatt.crm.controller.RechnungController,OK,10,0,0,14,0,2,0,8,8 +s3-admincontroller,at.werkstatt.crm.controller.AdminController,OK,8,0,0,15,0,0,0,2,2 +s4-rechnung,at.werkstatt.crm.model.Rechnung,OK,24,0,0,34,0,0,0,12,12 diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt new file mode 100644 index 0000000..d737931 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s1-werkstattservice/repaired/PHASE-B-ABANDONED.txt @@ -0,0 +1,14 @@ +ABANDONED — 0 repair minutes, no fix-log rows. + +The Phase-A artifact of this cell is `as-generated/EXTRACTION-FAILED.txt`, whose entire +content is the literal string `null`: the call stopped with finish_reason=length after +spending its whole 16 000-token output budget on reasoning tokens, so the assistant +message content was JSON null (see amendment A1). There is no generated code here to +repair. + +Per amendment A2.3 the cell is recorded as ABANDONED at zero minutes and stays NO_CODE +after repair. Writing a test class from scratch would be the repairer GENERATING tests, +which is precisely what Phase B is not (A2.2). + +Read this as an UNREPAIRABLE cell, not a cheap one. It must never be averaged into a +mean repair time — that would make a model look better the more completely it failed. diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..540ce85 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..46937b5 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,183 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @10db82ae (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AuftragControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.677 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:19:31 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:19:31 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:19:32 AM PIT >> INFO : Sending 1 test classes to minion +11:19:32 AM PIT >> INFO : Sent tests to minion +11:19:32 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/11:19:33 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:19:33 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:19:33 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsServerError_whenServiceThrows()]) took 800 ms +11:19:33 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsServerError_whenServiceThrows()]) covered 7 blocks +11:19:33 AM PIT >> INFO : Created 1 mutation test units +/11:19:35 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 10 Killed 10 (100%) +> KILLED 10 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 2 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsServerError_whenServiceThrows()]) took 800 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsServerError_whenServiceThrows()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 21/21 (100%) +>> 1 tests examined +>> Generated 13 mutations Killed 13 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 13 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 10.441 s +[INFO] Finished at: 2026-08-02T11:19:35+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html new file mode 100644 index 0000000..f1e4ffe --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html @@ -0,0 +1,1324 @@ + + + + + + + + + +

AuftragController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Auftrag;
+ +4 + + + + + + +
import at.werkstatt.crm.model.AuftragPosition;
+ +5 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +6 + + + + + + +
import java.util.List;
+ +7 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +16 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +17 + + + + + + +
+ +18 + + + + + + +
@RestController
+ +19 + + + + + + +
@RequestMapping("/api/auftraege")
+ +20 + + + + + + +
public class AuftragController {
+ +21 + + + + + + +
+ +22 + + + + + + +
  private final WerkstattService werkstattService;
+ +23 + + + + + + +
+ +24 + + + + + + +
  public AuftragController(WerkstattService werkstattService) {
+ +25 + + + + + + +
    this.werkstattService = werkstattService;
+ +26 + + + + + + +
  }
+ +27 + + + + + + +
+ +28 + + + + + + +
  @GetMapping
+ +29 + + + + + + +
  public List<Auftrag> liste(@RequestParam(value = "status", required = false) String status) {
+ +30 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED
+ +
+
+
    return werkstattService.getAuftraege(status);
+ +31 + + + + + + +
  }
+ +32 + + + + + + +
+ +33 + + + + + + +
  @GetMapping("/{id}")
+ +34 + + + + + + +
  public ResponseEntity<Auftrag> einzeln(@PathVariable long id) {
+ +35 + + + + + + +
    Auftrag auftrag = werkstattService.getAuftrag(id);
+ +36 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
    if (auftrag == null) {
+ +37 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
      return ResponseEntity.notFound().build();
+ +38 + + + + + + +
    }
+ +39 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
    return ResponseEntity.ok(auftrag);
+ +40 + + + + + + +
  }
+ +41 + + + + + + +
+ +42 + + + + + + +
  @PostMapping
+ +43 + + + + + + +
  public ResponseEntity<?> anlegen(@RequestBody Auftrag auftrag) {
+ +44 + + + + + + +
    try {
+ +45 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.neuerAuftrag(auftrag));
+ +46 + + + + + + +
    } catch (Exception e) {
+ +47 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +48 + + + + + + +
    }
+ +49 + + + + + + +
  }
+ +50 + + + + + + +
+ +51 + + + + + + +
  // Statuswechsel als PUT mit Query-Parameter, hat sich so eingebuergert
+ +52 + + + + + + +
  @PutMapping("/{id}/status")
+ +53 + + + + + + +
  public ResponseEntity<?> status(@PathVariable long id, @RequestParam("neu") String neuerStatus) {
+ +54 + + + + + + +
    try {
+ +55 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.setzeStatus(id, neuerStatus));
+ +56 + + + + + + +
    } catch (Exception e) {
+ +57 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +58 + + + + + + +
    }
+ +59 + + + + + + +
  }
+ +60 + + + + + + +
+ +61 + + + + + + +
  @PostMapping("/{id}/positionen")
+ +62 + + + + + + +
  public ResponseEntity<?> position(@PathVariable long id, @RequestBody AuftragPosition position) {
+ +63 + + + + + + +
    try {
+ +64 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.neuePosition(id, position));
+ +65 + + + + + + +
    } catch (Exception e) {
+ +66 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +67 + + + + + + +
    }
+ +68 + + + + + + +
  }
+ +69 + + + + + + +
+ +70 + + + + + + +
  @DeleteMapping("/positionen/{positionId}")
+ +71 + + + + + + +
  public ResponseEntity<?> positionLoeschen(@PathVariable long positionId) {
+ +72 + + + + + + +
    try {
+ +73 + + +1 + +1. positionLoeschen : removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED
+ +
+
+
      werkstattService.loeschePosition(positionId);
+ +74 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
      return ResponseEntity.ok().build();
+ +75 + + + + + + +
    } catch (Exception e) {
+ +76 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +77 + + + + + + +
    }
+ +78 + + + + + + +
  }
+ +79 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_returnsAuftraegeFromService_withStatus()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED + +

36 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenAuftragMissing()]
negated conditional → KILLED + +

37 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenAuftragMissing()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsOk_whenAuftragFound()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

45 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsOk_withCreatedAuftrag()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

47 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsServerError_withNullMessage_whenExceptionMessageIsNull()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

55 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsOk_withUpdatedAuftrag()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

57 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsServerError_whenServiceThrows()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

64 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_returnsOk_withCreatedPosition()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

66 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_returnsServerError_whenServiceThrows()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

73 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsServerError_whenServiceThrows()]
removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED + +

74 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsOk_whenSuccessful()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

76 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsServerError_whenServiceThrows()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsServerError_withNullMessage_whenExceptionMessageIsNull()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsServerError_whenServiceThrows()] (800 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_returnsOk_withCreatedPosition()] (29 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsServerError_whenServiceThrows()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsOk_withUpdatedAuftrag()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_returnsAuftraegeFromService_withStatus()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_returnsAuftraegeFromService_withNullStatus()] (13 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenAuftragMissing()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsOk_withCreatedAuftrag()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsOk_whenAuftragFound()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsOk_whenSuccessful()] (15 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_returnsServerError_whenServiceThrows()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsServerError_whenServiceThrows()] (4 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..8cda860 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
13/13
100%
13/13
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AuftragController.java
100%
21/21
100%
13/13
100%
13/13
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..d329055 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
13/13
100%
13/13
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
21/21
100%
13/13
100%
13/13
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..bcdf237 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,16 @@ + + +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;45org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsOk_withCreatedAuftrag()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;47org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegen_returnsServerError_withNullMessage_whenExceptionMessageIsNull()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;36org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenAuftragMissing()]negated conditional +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;37org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenAuftragMissing()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzeln_returnsOk_whenAuftragFound()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:liste_returnsAuftraegeFromService_withStatus()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;64org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_returnsOk_withCreatedPosition()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;66org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:position_returnsServerError_whenServiceThrows()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;73org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsServerError_whenServiceThrows()]removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsOk_whenSuccessful()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;76org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschen_returnsServerError_whenServiceThrows()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;55org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsOk_withUpdatedAuftrag()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;57org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:status_returnsServerError_whenServiceThrows()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml new file mode 100644 index 0000000..d2462ae --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt new file mode 100644 index 0000000..914d830 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AuftragControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.677 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java new file mode 100644 index 0000000..aac5338 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java @@ -0,0 +1,181 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.AuftragController; +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.service.WerkstattService; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +@ExtendWith(MockitoExtension.class) +class AuftragControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private AuftragController controller; + + @BeforeEach + void setUp() { + controller = new AuftragController(werkstattService); + } + + @Test + void liste_returnsAuftraegeFromService_withStatus() { + List expected = List.of(mock(Auftrag.class)); + when(werkstattService.getAuftraege("ANGENOMMEN")).thenReturn(expected); + + List result = controller.liste("ANGENOMMEN"); + + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAuftraege("ANGENOMMEN"); + } + + @Test + void liste_returnsAuftraegeFromService_withNullStatus() { + List expected = Collections.emptyList(); + when(werkstattService.getAuftraege(null)).thenReturn(expected); + + List result = controller.liste(null); + + assertThat(result).isEmpty(); + verify(werkstattService).getAuftraege(null); + } + + @Test + void einzeln_returnsOk_whenAuftragFound() { + Auftrag auftrag = mock(Auftrag.class); + when(werkstattService.getAuftrag(1L)).thenReturn(auftrag); + + ResponseEntity response = controller.einzeln(1L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(auftrag); + } + + @Test + void einzeln_returnsNotFound_whenAuftragMissing() { + when(werkstattService.getAuftrag(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); + assertThat(response.getBody()).isNull(); + } + + @Test + void anlegen_returnsOk_withCreatedAuftrag() { + Auftrag input = mock(Auftrag.class); + Auftrag created = mock(Auftrag.class); + when(werkstattService.neuerAuftrag(input)).thenReturn(created); + + ResponseEntity response = controller.anlegen(input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(created); + } + + @Test + void anlegen_returnsServerError_whenServiceThrows() { + Auftrag input = mock(Auftrag.class); + when(werkstattService.neuerAuftrag(input)).thenThrow(new RuntimeException("Fehler beim Anlegen")); + + ResponseEntity response = controller.anlegen(input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Fehler beim Anlegen"); + } + + @Test + void status_returnsOk_withUpdatedAuftrag() { + Auftrag updated = mock(Auftrag.class); + when(werkstattService.setzeStatus(5L, "FERTIG")).thenReturn(updated); + + ResponseEntity response = controller.status(5L, "FERTIG"); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(updated); + } + + @Test + void status_returnsServerError_whenServiceThrows() { + when(werkstattService.setzeStatus(5L, "UNBEKANNT")).thenThrow(new RuntimeException("Ungueltiger Status")); + + ResponseEntity response = controller.status(5L, "UNBEKANNT"); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Ungueltiger Status"); + } + + @Test + void position_returnsOk_withCreatedPosition() { + AuftragPosition input = mock(AuftragPosition.class); + AuftragPosition created = mock(AuftragPosition.class); + when(werkstattService.neuePosition(3L, input)).thenReturn(created); + + ResponseEntity response = controller.position(3L, input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(created); + } + + @Test + void position_returnsServerError_whenServiceThrows() { + AuftragPosition input = mock(AuftragPosition.class); + when(werkstattService.neuePosition(3L, input)).thenThrow(new RuntimeException("Auftrag nicht gefunden")); + + ResponseEntity response = controller.position(3L, input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Auftrag nicht gefunden"); + } + + @Test + void positionLoeschen_returnsOk_whenSuccessful() { + doNothing().when(werkstattService).loeschePosition(7L); + + ResponseEntity response = controller.positionLoeschen(7L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(7L); + } + + @Test + void positionLoeschen_returnsServerError_whenServiceThrows() { + doThrow(new RuntimeException("Position nicht gefunden")).when(werkstattService).loeschePosition(8L); + + ResponseEntity response = controller.positionLoeschen(8L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Position nicht gefunden"); + } + + @Test + void anlegen_returnsServerError_withNullMessage_whenExceptionMessageIsNull() { + Auftrag input = mock(Auftrag.class); + when(werkstattService.neuerAuftrag(input)).thenThrow(new RuntimeException()); + + ResponseEntity response = controller.anlegen(input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isNull(); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..064ef51 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..b372cdc --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/maven-test.log @@ -0,0 +1,189 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @27c86f2d (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.KundenControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.504 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:19:42 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:19:42 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:19:42 AM PIT >> INFO : Sending 1 test classes to minion +11:19:42 AM PIT >> INFO : Sent tests to minion +11:19:43 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/11:19:44 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:19:44 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:19:44 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstring_gibtAlleKundenZurueck()]) took 705 ms +11:19:44 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()]) covered 9 blocks +11:19:44 AM PIT >> INFO : Created 1 mutation test units +/11:19:46 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 7 Killed 7 (100%) +> KILLED 7 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 2 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstring_gibtAlleKundenZurueck()]) took 705 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()]) covered 9 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 21/21 (100%) +>> 1 tests examined +>> Generated 17 mutations Killed 17 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 18 tests (1.06 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 9.941 s +[INFO] Finished at: 2026-08-02T11:19:46+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html new file mode 100644 index 0000000..04d3cef --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html @@ -0,0 +1,1326 @@ + + + + + + + + + +

KundenController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Fahrzeug;
+ +4 + + + + + + +
import at.werkstatt.crm.model.Kunde;
+ +5 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +6 + + + + + + +
import java.util.List;
+ +7 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +16 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +17 + + + + + + +
+ +18 + + + + + + +
@RestController
+ +19 + + + + + + +
@RequestMapping("/api/kunden")
+ +20 + + + + + + +
public class KundenController {
+ +21 + + + + + + +
+ +22 + + + + + + +
  private final WerkstattService werkstattService;
+ +23 + + + + + + +
+ +24 + + + + + + +
  public KundenController(WerkstattService werkstattService) {
+ +25 + + + + + + +
    this.werkstattService = werkstattService;
+ +26 + + + + + + +
  }
+ +27 + + + + + + +
+ +28 + + + + + + +
  @GetMapping
+ +29 + + + + + + +
  public List<Kunde> liste(@RequestParam(value = "suche", required = false) String suche) {
+ +30 + + +3 + +1. liste : negated conditional → KILLED
+2. liste : changed conditional boundary → KILLED
+3. liste : negated conditional → KILLED
+ +
+
+
    if (suche != null && suche.trim().length() > 0) {
+ +31 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
      return werkstattService.sucheKunden(suche.trim());
+ +32 + + + + + + +
    }
+ +33 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
    return werkstattService.getAlleKunden();
+ +34 + + + + + + +
  }
+ +35 + + + + + + +
+ +36 + + + + + + +
  @GetMapping("/{id}")
+ +37 + + + + + + +
  public ResponseEntity<Kunde> einzeln(@PathVariable long id) {
+ +38 + + + + + + +
    Kunde kunde = werkstattService.getKunde(id);
+ +39 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
    if (kunde == null) {
+ +40 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
      return ResponseEntity.notFound().build();
+ +41 + + + + + + +
    }
+ +42 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
    return ResponseEntity.ok(kunde);
+ +43 + + + + + + +
  }
+ +44 + + + + + + +
+ +45 + + + + + + +
  @GetMapping("/{id}/fahrzeuge")
+ +46 + + + + + + +
  public List<Fahrzeug> fahrzeuge(@PathVariable long id) {
+ +47 + + +1 + +1. fahrzeuge : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED
+ +
+
+
    return werkstattService.getFahrzeugeZuKunde(id);
+ +48 + + + + + + +
  }
+ +49 + + + + + + +
+ +50 + + + + + + +
  @PostMapping
+ +51 + + + + + + +
  public Kunde anlegen(@RequestBody Kunde kunde) {
+ +52 + + + + + + +
    // keine Validierung, das Frontend schickt schon das Richtige
+ +53 + + +1 + +1. anlegen : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
    kunde.setId(null);
+ +54 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED
+ +
+
+
    return werkstattService.speichereKunde(kunde);
+ +55 + + + + + + +
  }
+ +56 + + + + + + +
+ +57 + + + + + + +
  @PutMapping("/{id}")
+ +58 + + + + + + +
  public ResponseEntity<?> aendern(@PathVariable long id, @RequestBody Kunde kunde) {
+ +59 + + + + + + +
    try {
+ +60 + + +1 + +1. aendern : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
      kunde.setId(id);
+ +61 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.speichereKunde(kunde));
+ +62 + + + + + + +
    } catch (Exception e) {
+ +63 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +64 + + + + + + +
    }
+ +65 + + + + + + +
  }
+ +66 + + + + + + +
+ +67 + + + + + + +
  @DeleteMapping("/{id}")
+ +68 + + + + + + +
  public ResponseEntity<?> loeschen(@PathVariable long id) {
+ +69 + + + + + + +
    try {
+ +70 + + +1 + +1. loeschen : removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED
+ +
+
+
      werkstattService.loescheKunde(id);
+ +71 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
      return ResponseEntity.ok().build();
+ +72 + + + + + + +
    } catch (Exception e) {
+ +73 + + + + + + +
      // Meldung 1:1 zum Client, hilft beim Support-Telefonat
+ +74 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +75 + + + + + + +
    }
+ +76 + + + + + + +
  }
+ +77 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()]
negated conditional → KILLED +

2.2
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()]
changed conditional boundary → KILLED +

3.3
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()]
negated conditional → KILLED + +

31 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

33 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtVorhanden_gibtNotFoundZurueck()]
negated conditional → KILLED + +

40 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtVorhanden_gibtNotFoundZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

42 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeVorhanden_gibtOkMitKundeZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

47 + + + +

1.1
Location : fahrzeuge
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_gibtListeZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED + +

53 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

54 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED + +

60 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

61 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

63 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

70 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()]
removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED + +

71 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_erfolgreich_gibtOkZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

74 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeerstring_gibtAlleKundenZurueck()] (705 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()] (5 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()] (5 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()] (1 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_erfolgreich_gibtOkZurueck()] (15 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_ohneSuche_gibtAlleKundenZurueck()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtVorhanden_gibtNotFoundZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeVorhanden_gibtOkMitKundeZurueck()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_gibtListeZurueck()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_leereListe()] (3 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..893498f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
17/17
100%
17/17
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
KundenController.java
100%
21/21
100%
17/17
100%
17/17
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..e38240b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
17/17
100%
17/17
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
21/21
100%
17/17
100%
17/17
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..719223e --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,20 @@ + + +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;60org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator61at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;61org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator154at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;63org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator278at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;53org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator50at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;54org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator122at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setztIdAufNullUndSpeichert()]replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtVorhanden_gibtNotFoundZurueck()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;40org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeNichtVorhanden_gibtNotFoundZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;42org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_kundeVorhanden_gibtOkMitKundeZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllerfahrzeuge(J)Ljava/util/List;47org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_gibtListeZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()]changed conditional boundary +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator40at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;31org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator166at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitSuchbegriff_gibtGefundeneKundenZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;33org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator238at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:liste_mitLeererSuche_gibtAlleKundenZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;70org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()]removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;71org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_erfolgreich_gibtOkZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml new file mode 100644 index 0000000..936ea11 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt new file mode 100644 index 0000000..4f76964 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.KundenControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.504 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java new file mode 100644 index 0000000..f5d5416 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java @@ -0,0 +1,194 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.KundenController; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.service.WerkstattService; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.ResponseEntity; + +@ExtendWith(MockitoExtension.class) +class KundenControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private KundenController controller; + + @BeforeEach + void setUp() { + controller = new KundenController(werkstattService); + } + + @Test + void liste_ohneSuche_gibtAlleKundenZurueck() { + List alle = List.of(new Kunde(), new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = controller.liste(null); + + assertThat(result).isSameAs(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void liste_mitLeererSuche_gibtAlleKundenZurueck() { + List alle = List.of(new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = controller.liste(" "); + + assertThat(result).isSameAs(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void liste_mitLeerstring_gibtAlleKundenZurueck() { + List alle = List.of(new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = controller.liste(""); + + assertThat(result).isSameAs(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void liste_mitSuchbegriff_gibtGefundeneKundenZurueck() { + List gefunden = List.of(new Kunde()); + when(werkstattService.sucheKunden("Mueller")).thenReturn(gefunden); + + List result = controller.liste(" Mueller "); + + assertThat(result).isSameAs(gefunden); + verify(werkstattService).sucheKunden("Mueller"); + verify(werkstattService, never()).getAlleKunden(); + } + + @Test + void einzeln_kundeVorhanden_gibtOkMitKundeZurueck() { + Kunde kunde = new Kunde(); + kunde.setId(5L); + when(werkstattService.getKunde(5L)).thenReturn(kunde); + + ResponseEntity response = controller.einzeln(5L); + + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isSameAs(kunde); + } + + @Test + void einzeln_kundeNichtVorhanden_gibtNotFoundZurueck() { + when(werkstattService.getKunde(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCode().value()).isEqualTo(404); + assertThat(response.getBody()).isNull(); + } + + @Test + void fahrzeuge_gibtListeZurueck() { + List fahrzeuge = List.of(new Fahrzeug(), new Fahrzeug()); + when(werkstattService.getFahrzeugeZuKunde(7L)).thenReturn(fahrzeuge); + + List result = controller.fahrzeuge(7L); + + assertThat(result).isSameAs(fahrzeuge); + verify(werkstattService).getFahrzeugeZuKunde(7L); + } + + @Test + void fahrzeuge_leereListe() { + when(werkstattService.getFahrzeugeZuKunde(1L)).thenReturn(Collections.emptyList()); + + List result = controller.fahrzeuge(1L); + + assertThat(result).isEmpty(); + } + + @Test + void anlegen_setztIdAufNullUndSpeichert() { + Kunde eingabe = new Kunde(); + eingabe.setId(123L); + Kunde gespeichert = new Kunde(); + gespeichert.setId(1L); + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(gespeichert); + + Kunde result = controller.anlegen(eingabe); + + assertThat(eingabe.getId()).isNull(); + assertThat(result).isSameAs(gespeichert); + verify(werkstattService).speichereKunde(eingabe); + } + + @Test + void aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck() { + Kunde eingabe = new Kunde(); + Kunde gespeichert = new Kunde(); + gespeichert.setId(10L); + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(gespeichert); + + ResponseEntity response = controller.aendern(10L, eingabe); + + assertThat(eingabe.getId()).isEqualTo(10L); + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isSameAs(gespeichert); + verify(werkstattService).speichereKunde(eingabe); + } + + @Test + void aendern_serviceWirftException_gibtStatus500MitFehlermeldungZurueck() { + Kunde eingabe = new Kunde(); + when(werkstattService.speichereKunde(any(Kunde.class))) + .thenThrow(new RuntimeException("Speicherfehler")); + + ResponseEntity response = controller.aendern(3L, eingabe); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Speicherfehler"); + assertThat(eingabe.getId()).isEqualTo(3L); + } + + @Test + void loeschen_erfolgreich_gibtOkZurueck() { + doNothing().when(werkstattService).loescheKunde(4L); + + ResponseEntity response = controller.loeschen(4L); + + assertThat(response.getStatusCode().value()).isEqualTo(200); + verify(werkstattService).loescheKunde(4L); + } + + @Test + void loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck() { + doThrow(new RuntimeException("Kunde referenziert Fahrzeuge")) + .when(werkstattService).loescheKunde(8L); + + ResponseEntity response = controller.loeschen(8L); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Kunde referenziert Fahrzeuge"); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..9d12bb3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..3e72d86 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,177 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @402e37bc (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.588 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:19:54 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:19:54 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:19:55 AM PIT >> INFO : Sending 1 test classes to minion +11:19:55 AM PIT >> INFO : Sent tests to minion +11:19:55 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-11:19:56 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:19:56 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:19:56 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_gefunden_gibt200UndRechnungZurueck()]) took 712 ms +11:19:56 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_wirftException_gibt500UndFehlermeldungZurueck()]) covered 7 blocks +11:19:56 AM PIT >> INFO : Created 1 mutation test units +/11:19:58 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 6 Killed 6 (100%) +> KILLED 6 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_gefunden_gibt200UndRechnungZurueck()]) took 712 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_wirftException_gibt500UndFehlermeldungZurueck()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 14/14 (100%) +>> 1 tests examined +>> Generated 8 mutations Killed 8 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 9 tests (1.12 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 10.586 s +[INFO] Finished at: 2026-08-02T11:19:58+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html new file mode 100644 index 0000000..58d1dd1 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html @@ -0,0 +1,923 @@ + + + + + + + + + +

RechnungController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Rechnung;
+ +4 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +5 + + + + + + +
import java.util.List;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +13 + + + + + + +
+ +14 + + + + + + +
@RestController
+ +15 + + + + + + +
@RequestMapping("/api/rechnungen")
+ +16 + + + + + + +
public class RechnungController {
+ +17 + + + + + + +
+ +18 + + + + + + +
  private final WerkstattService werkstattService;
+ +19 + + + + + + +
+ +20 + + + + + + +
  public RechnungController(WerkstattService werkstattService) {
+ +21 + + + + + + +
    this.werkstattService = werkstattService;
+ +22 + + + + + + +
  }
+ +23 + + + + + + +
+ +24 + + + + + + +
  @GetMapping
+ +25 + + + + + + +
  public List<Rechnung> liste() {
+ +26 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED
+ +
+
+
    return werkstattService.getAlleRechnungen();
+ +27 + + + + + + +
  }
+ +28 + + + + + + +
+ +29 + + + + + + +
  @GetMapping("/{id}")
+ +30 + + + + + + +
  public ResponseEntity<Rechnung> einzeln(@PathVariable long id) {
+ +31 + + + + + + +
    Rechnung rechnung = werkstattService.getRechnung(id);
+ +32 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
    if (rechnung == null) {
+ +33 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
      return ResponseEntity.notFound().build();
+ +34 + + + + + + +
    }
+ +35 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
    return ResponseEntity.ok(rechnung);
+ +36 + + + + + + +
  }
+ +37 + + + + + + +
+ +38 + + + + + + +
  @PostMapping("/auftrag/{auftragId}")
+ +39 + + + + + + +
  public ResponseEntity<?> erstellen(@PathVariable long auftragId) {
+ +40 + + + + + + +
    try {
+ +41 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.erstelleRechnung(auftragId));
+ +42 + + + + + + +
    } catch (Exception e) {
+ +43 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +44 + + + + + + +
    }
+ +45 + + + + + + +
  }
+ +46 + + + + + + +
+ +47 + + + + + + +
  @PutMapping("/{id}/bezahlt")
+ +48 + + + + + + +
  public ResponseEntity<?> bezahlt(@PathVariable long id) {
+ +49 + + + + + + +
    try {
+ +50 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.setzeBezahlt(id));
+ +51 + + + + + + +
    } catch (Exception e) {
+ +52 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +53 + + + + + + +
    }
+ +54 + + + + + + +
  }
+ +55 + + + + + + +
}

Mutations

26 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_gibtAlleRechnungenZurueck()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED + +

32 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibt404Zurueck()]
negated conditional → KILLED + +

33 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibt404Zurueck()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

35 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_gefunden_gibt200UndRechnungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

41 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_erfolgreich_gibt200UndRechnungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

43 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_wirftExceptionMitNullMessage_gibt500UndNullBodyZurueck()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

50 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_erfolgreich_gibt200UndRechnungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

52 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_wirftException_gibt500UndFehlermeldungZurueck()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_erfolgreich_gibt200UndRechnungZurueck()] (3 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_gibtAlleRechnungenZurueck()] (9 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_gibtLeereListeZurueck()] (11 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibt404Zurueck()] (4 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_gefunden_gibt200UndRechnungZurueck()] (712 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_ruftServiceMitKorrekterIdAuf()] (3 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_erfolgreich_gibt200UndRechnungZurueck()] (4 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_wirftException_gibt500UndFehlermeldungZurueck()] (9 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_wirftExceptionMitNullMessage_gibt500UndNullBodyZurueck()] (3 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_wirftException_gibt500UndFehlermeldungZurueck()] (4 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..d127636 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
14/14
100%
8/8
100%
8/8
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
RechnungController.java
100%
14/14
100%
8/8
100%
8/8
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..35512af --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
14/14
100%
8/8
100%
8/8
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
14/14
100%
8/8
100%
8/8
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..7d74805 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,11 @@ + + +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;50org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_erfolgreich_gibt200UndRechnungZurueck()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;52org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_wirftException_gibt500UndFehlermeldungZurueck()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;32org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibt404Zurueck()]negated conditional +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;33org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_nichtGefunden_gibt404Zurueck()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;35org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_gefunden_gibt200UndRechnungZurueck()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;41org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_erfolgreich_gibt200UndRechnungZurueck()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;43org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_wirftExceptionMitNullMessage_gibt500UndNullBodyZurueck()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerliste()Ljava/util/List;26org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator61at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_gibtAlleRechnungenZurueck()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml new file mode 100644 index 0000000..7bf9450 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt new file mode 100644 index 0000000..a5a8eab --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.588 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java new file mode 100644 index 0000000..ffdaa7b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java @@ -0,0 +1,150 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.RechnungController; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +@ExtendWith(MockitoExtension.class) +class RechnungControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private RechnungController controller; + + @BeforeEach + void setUp() { + controller = new RechnungController(werkstattService); + } + + @Test + void liste_gibtAlleRechnungenZurueck() { + Rechnung r1 = new Rechnung(); + r1.setId(1L); + Rechnung r2 = new Rechnung(); + r2.setId(2L); + List rechnungen = List.of(r1, r2); + when(werkstattService.getAlleRechnungen()).thenReturn(rechnungen); + + List result = controller.liste(); + + assertThat(result).isEqualTo(rechnungen); + verify(werkstattService).getAlleRechnungen(); + } + + @Test + void liste_gibtLeereListeZurueck() { + when(werkstattService.getAlleRechnungen()).thenReturn(Collections.emptyList()); + + List result = controller.liste(); + + assertThat(result).isEmpty(); + } + + @Test + void einzeln_gefunden_gibt200UndRechnungZurueck() { + Rechnung rechnung = new Rechnung(); + rechnung.setId(5L); + when(werkstattService.getRechnung(5L)).thenReturn(rechnung); + + ResponseEntity response = controller.einzeln(5L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(rechnung); + } + + @Test + void einzeln_nichtGefunden_gibt404Zurueck() { + when(werkstattService.getRechnung(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); + assertThat(response.getBody()).isNull(); + } + + @Test + void erstellen_erfolgreich_gibt200UndRechnungZurueck() { + Rechnung rechnung = new Rechnung(); + rechnung.setId(10L); + rechnung.setAuftragId(3L); + when(werkstattService.erstelleRechnung(3L)).thenReturn(rechnung); + + ResponseEntity response = controller.erstellen(3L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(rechnung); + } + + @Test + void erstellen_wirftException_gibt500UndFehlermeldungZurueck() { + when(werkstattService.erstelleRechnung(anyLong())) + .thenThrow(new IllegalStateException("Auftrag nicht gefunden")); + + ResponseEntity response = controller.erstellen(42L); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Auftrag nicht gefunden"); + } + + @Test + void erstellen_wirftExceptionMitNullMessage_gibt500UndNullBodyZurueck() { + when(werkstattService.erstelleRechnung(anyLong())) + .thenThrow(new RuntimeException()); + + ResponseEntity response = controller.erstellen(1L); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isNull(); + } + + @Test + void bezahlt_erfolgreich_gibt200UndRechnungZurueck() { + Rechnung rechnung = new Rechnung(); + rechnung.setId(7L); + rechnung.setBezahlt(true); + when(werkstattService.setzeBezahlt(7L)).thenReturn(rechnung); + + ResponseEntity response = controller.bezahlt(7L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(rechnung); + } + + @Test + void bezahlt_wirftException_gibt500UndFehlermeldungZurueck() { + when(werkstattService.setzeBezahlt(anyLong())) + .thenThrow(new IllegalArgumentException("Rechnung nicht gefunden")); + + ResponseEntity response = controller.bezahlt(123L); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Rechnung nicht gefunden"); + } + + @Test + void bezahlt_ruftServiceMitKorrekterIdAuf() { + Rechnung rechnung = new Rechnung(); + when(werkstattService.setzeBezahlt(eq(55L))).thenReturn(rechnung); + + controller.bezahlt(55L); + + verify(werkstattService).setzeBezahlt(55L); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..f096500 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..b4f15d3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/maven-test.log @@ -0,0 +1,165 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @78dd667e (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AdminControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.676 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:20:06 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:20:06 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:20:07 AM PIT >> INFO : Sending 1 test classes to minion +11:20:07 AM PIT >> INFO : Sent tests to minion +11:20:07 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|11:20:08 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:20:08 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:20:08 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withLargeCount_returnsCorrectMeldung()]) took 591 ms +11:20:08 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsFirmaNameVersionAndStatistikFromService()]) covered 8 blocks +11:20:08 AM PIT >> INFO : Created 1 mutation test units +/11:20:09 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withLargeCount_returnsCorrectMeldung()]) took 591 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsFirmaNameVersionAndStatistikFromService()]) covered 8 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 15/15 (100%) +>> 1 tests examined +>> Generated 2 mutations Killed 2 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 2 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 10.369 s +[INFO] Finished at: 2026-08-02T11:20:09+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html new file mode 100644 index 0000000..fcb1ae2 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html @@ -0,0 +1,775 @@ + + + + + + + + + +

AdminController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +4 + + + + + + +
import java.util.HashMap;
+ +5 + + + + + + +
import java.util.Map;
+ +6 + + + + + + +
import org.springframework.beans.factory.annotation.Value;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +10 + + + + + + +
+ +11 + + + + + + +
/**
+ +12 + + + + + + +
 * Stage 5 (SD-2, ADR-0004): the JSP admin page is absorbed into the SPA — this controller now
+ +13 + + + + + + +
 * serves JSON for the Angular /admin route (gson and the whole JSP/JSTL stack died with the page).
+ +14 + + + + + + +
 * POST /admin/bereinigen keeps its path and its exact German meldung: that contract is pinned by
+ +15 + + + + + + +
 * the characterization suite on both stands.
+ +16 + + + + + + +
 */
+ +17 + + + + + + +
@RestController
+ +18 + + + + + + +
public class AdminController {
+ +19 + + + + + + +
+ +20 + + + + + + +
  private final WerkstattService werkstattService;
+ +21 + + + + + + +
  private final String firmaName;
+ +22 + + + + + + +
  private final String version;
+ +23 + + + + + + +
+ +24 + + + + + + +
  public AdminController(
+ +25 + + + + + + +
      WerkstattService werkstattService,
+ +26 + + + + + + +
      @Value("${werkstatt.firma.name}") String firmaName,
+ +27 + + + + + + +
      @Value("${werkstatt.version:?}") String version) {
+ +28 + + + + + + +
    this.werkstattService = werkstattService;
+ +29 + + + + + + +
    this.firmaName = firmaName;
+ +30 + + + + + + +
    this.version = version;
+ +31 + + + + + + +
  }
+ +32 + + + + + + +
+ +33 + + + + + + +
  @GetMapping("/api/admin/statistik")
+ +34 + + + + + + +
  public Map<String, Object> statistik() {
+ +35 + + + + + + +
    Map<String, Object> antwort = new HashMap<>();
+ +36 + + + + + + +
    antwort.put("firmaName", firmaName);
+ +37 + + + + + + +
    antwort.put("version", version);
+ +38 + + + + + + +
    antwort.put("statistik", werkstattService.getAdminStatistik());
+ +39 + + +1 + +1. statistik : replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::statistik → KILLED
+ +
+
+
    return antwort;
+ +40 + + + + + + +
  }
+ +41 + + + + + + +
+ +42 + + + + + + +
  @PostMapping("/admin/bereinigen")
+ +43 + + + + + + +
  public Map<String, Object> bereinigen() {
+ +44 + + + + + + +
    int anzahl = werkstattService.bereinigeStornierte();
+ +45 + + + + + + +
    Map<String, Object> antwort = new HashMap<>();
+ +46 + + + + + + +
    antwort.put("geloescht", anzahl);
+ +47 + + + + + + +
    antwort.put("meldung", anzahl + " stornierte Aufträge wurden endgültig gelöscht.");
+ +48 + + +1 + +1. bereinigen : replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED
+ +
+
+
    return antwort;
+ +49 + + + + + + +
  }
+ +50 + + + + + + +
}

Mutations

39 + + + +

1.1
Location : statistik
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_withEmptyStatistikMap_returnsEmptyMap()]
replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::statistik → KILLED + +

48 + + + +

1.1
Location : bereinigen
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withZeroCount_returnsGermanMeldungWithZero()]
replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_withEmptyStatistikMap_returnsEmptyMap()] (1 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsFirmaNameVersionAndStatistikFromService()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_usesVersionDefaultWhenConfiguredWithDefaultPlaceholder()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_withNullStatistikFromService_returnsNullEntry()] (3 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withZeroCount_returnsGermanMeldungWithZero()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_callsServiceExactlyOnce()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withPositiveCount_returnsGermanMeldungAndCount()] (14 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withLargeCount_returnsCorrectMeldung()] (591 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..ac23518 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
15/15
100%
2/2
100%
2/2
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AdminController.java
100%
15/15
100%
2/2
100%
2/2
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..68a2707 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
15/15
100%
2/2
100%
2/2
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
15/15
100%
2/2
100%
2/2
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..95c34e4 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,5 @@ + + +AdminController.javaat.werkstatt.crm.controller.AdminControllerbereinigen()Ljava/util/Map;48org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator325at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withZeroCount_returnsGermanMeldungWithZero()]replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::bereinigen +AdminController.javaat.werkstatt.crm.controller.AdminControllerstatistik()Ljava/util/Map;39org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator355at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_withEmptyStatistikMap_returnsEmptyMap()]replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::statistik + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml new file mode 100644 index 0000000..e0f6bec --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt new file mode 100644 index 0000000..81a0640 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AdminControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.676 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java new file mode 100644 index 0000000..027c8ab --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java @@ -0,0 +1,132 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.AdminController; +import at.werkstatt.crm.service.WerkstattService; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class AdminControllerGeneratedTest { + + @Mock private WerkstattService werkstattService; + + private AdminController adminController; + + private static final String FIRMA_NAME = "Musterwerkstatt GmbH"; + private static final String VERSION = "1.2.3"; + + @BeforeEach + void setUp() { + adminController = new AdminController(werkstattService, FIRMA_NAME, VERSION); + } + + @Test + void statistik_returnsFirmaNameVersionAndStatistikFromService() { + Map serviceStatistik = new HashMap<>(); + serviceStatistik.put("anzahlKunden", 42); + serviceStatistik.put("anzahlAuftraege", 100); + when(werkstattService.getAdminStatistik()).thenReturn(serviceStatistik); + + Map result = adminController.statistik(); + + assertThat(result).hasSize(3); + assertThat(result.get("firmaName")).isEqualTo(FIRMA_NAME); + assertThat(result.get("version")).isEqualTo(VERSION); + assertThat(result.get("statistik")).isEqualTo(serviceStatistik); + + verify(werkstattService).getAdminStatistik(); + verifyNoMoreInteractions(werkstattService); + } + + @Test + void statistik_withNullStatistikFromService_returnsNullEntry() { + when(werkstattService.getAdminStatistik()).thenReturn(null); + + Map result = adminController.statistik(); + + assertThat(result).containsKey("statistik"); + assertThat(result.get("statistik")).isNull(); + assertThat(result.get("firmaName")).isEqualTo(FIRMA_NAME); + assertThat(result.get("version")).isEqualTo(VERSION); + + verify(werkstattService).getAdminStatistik(); + } + + @Test + void statistik_withEmptyStatistikMap_returnsEmptyMap() { + Map emptyStatistik = new HashMap<>(); + when(werkstattService.getAdminStatistik()).thenReturn(emptyStatistik); + + Map result = adminController.statistik(); + + assertThat(result.get("statistik")).isEqualTo(emptyStatistik); + assertThat(((Map) result.get("statistik"))).isEmpty(); + } + + @Test + void statistik_usesVersionDefaultWhenConfiguredWithDefaultPlaceholder() { + AdminController controllerWithDefault = + new AdminController(werkstattService, FIRMA_NAME, "?"); + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + Map result = controllerWithDefault.statistik(); + + assertThat(result.get("version")).isEqualTo("?"); + assertThat(result.get("firmaName")).isEqualTo(FIRMA_NAME); + } + + @Test + void bereinigen_withPositiveCount_returnsGermanMeldungAndCount() { + when(werkstattService.bereinigeStornierte()).thenReturn(5); + + Map result = adminController.bereinigen(); + + assertThat(result).hasSize(2); + assertThat(result.get("geloescht")).isEqualTo(5); + assertThat(result.get("meldung")).isEqualTo("5 stornierte Aufträge wurden endgültig gelöscht."); + + verify(werkstattService).bereinigeStornierte(); + verifyNoMoreInteractions(werkstattService); + } + + @Test + void bereinigen_withZeroCount_returnsGermanMeldungWithZero() { + when(werkstattService.bereinigeStornierte()).thenReturn(0); + + Map result = adminController.bereinigen(); + + assertThat(result.get("geloescht")).isEqualTo(0); + assertThat(result.get("meldung")).isEqualTo("0 stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_withLargeCount_returnsCorrectMeldung() { + when(werkstattService.bereinigeStornierte()).thenReturn(12345); + + Map result = adminController.bereinigen(); + + assertThat(result.get("geloescht")).isEqualTo(12345); + assertThat(result.get("meldung")) + .isEqualTo("12345 stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_callsServiceExactlyOnce() { + when(werkstattService.bereinigeStornierte()).thenReturn(1); + + adminController.bereinigen(); + + verify(werkstattService).bereinigeStornierte(); + verifyNoMoreInteractions(werkstattService); + } +} diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..b97f108 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/maven-test.log new file mode 100644 index 0000000..057471c --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/maven-test.log @@ -0,0 +1,189 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @6b4a4e18 (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.959 s -- in at.werkstatt.crm.gen.RechnungGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:20:17 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:20:17 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:20:18 AM PIT >> INFO : Sending 1 test classes to minion +11:20:18 AM PIT >> INFO : Sent tests to minion +11:20:18 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/-\|/-\|/-\|11:20:19 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:20:19 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:20:19 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragId_null()]) took 565 ms +11:20:19 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsTogether_independentState()]) covered 24 blocks +11:20:19 AM PIT >> INFO : Created 1 mutation test units +/11:20:21 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 5 Killed 5 (100%) +> KILLED 5 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragId_null()]) took 565 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsTogether_independentState()]) covered 24 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 34/34 (100%) +>> 1 tests examined +>> Generated 12 mutations Killed 12 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 14 tests (1.17 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 10.452 s +[INFO] Finished at: 2026-08-02T11:20:21+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html new file mode 100644 index 0000000..762f8b2 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html @@ -0,0 +1,1748 @@ + + + + + + + + + +

Rechnung.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.model;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.Date;
+ +4 + + + + + + +
+ +5 + + + + + + +
public class Rechnung {
+ +6 + + + + + + +
+ +7 + + + + + + +
  private Long id;
+ +8 + + + + + + +
  private String rechnungNr;
+ +9 + + + + + + +
  private Long auftragId;
+ +10 + + + + + + +
  private Date ausgestelltAm;
+ +11 + + + + + + +
  // Betraege als double, gerundet wird beim Erstellen (siehe WerkstattService)
+ +12 + + + + + + +
  private double summeNetto;
+ +13 + + + + + + +
  private double ust;
+ +14 + + + + + + +
  private double summeBrutto;
+ +15 + + + + + + +
  private boolean bezahlt;
+ +16 + + + + + + +
  private Date bezahltAm;
+ +17 + + + + + + +
+ +18 + + + + + + +
  // Anzeige
+ +19 + + + + + + +
  private String auftragNr;
+ +20 + + + + + + +
  private String kundeName;
+ +21 + + + + + + +
+ +22 + + + + + + +
  public Rechnung() {}
+ +23 + + + + + + +
+ +24 + + + + + + +
  public Long getId() {
+ +25 + + +1 + +1. getId : replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId → KILLED
+ +
+
+
    return id;
+ +26 + + + + + + +
  }
+ +27 + + + + + + +
+ +28 + + + + + + +
  public void setId(Long id) {
+ +29 + + + + + + +
    this.id = id;
+ +30 + + + + + + +
  }
+ +31 + + + + + + +
+ +32 + + + + + + +
  public String getRechnungNr() {
+ +33 + + +1 + +1. getRechnungNr : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr → KILLED
+ +
+
+
    return rechnungNr;
+ +34 + + + + + + +
  }
+ +35 + + + + + + +
+ +36 + + + + + + +
  public void setRechnungNr(String rechnungNr) {
+ +37 + + + + + + +
    this.rechnungNr = rechnungNr;
+ +38 + + + + + + +
  }
+ +39 + + + + + + +
+ +40 + + + + + + +
  public Long getAuftragId() {
+ +41 + + +1 + +1. getAuftragId : replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId → KILLED
+ +
+
+
    return auftragId;
+ +42 + + + + + + +
  }
+ +43 + + + + + + +
+ +44 + + + + + + +
  public void setAuftragId(Long auftragId) {
+ +45 + + + + + + +
    this.auftragId = auftragId;
+ +46 + + + + + + +
  }
+ +47 + + + + + + +
+ +48 + + + + + + +
  public Date getAusgestelltAm() {
+ +49 + + +1 + +1. getAusgestelltAm : replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm → KILLED
+ +
+
+
    return ausgestelltAm;
+ +50 + + + + + + +
  }
+ +51 + + + + + + +
+ +52 + + + + + + +
  public void setAusgestelltAm(Date ausgestelltAm) {
+ +53 + + + + + + +
    this.ausgestelltAm = ausgestelltAm;
+ +54 + + + + + + +
  }
+ +55 + + + + + + +
+ +56 + + + + + + +
  public double getSummeNetto() {
+ +57 + + +1 + +1. getSummeNetto : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto → KILLED
+ +
+
+
    return summeNetto;
+ +58 + + + + + + +
  }
+ +59 + + + + + + +
+ +60 + + + + + + +
  public void setSummeNetto(double summeNetto) {
+ +61 + + + + + + +
    this.summeNetto = summeNetto;
+ +62 + + + + + + +
  }
+ +63 + + + + + + +
+ +64 + + + + + + +
  public double getUst() {
+ +65 + + +1 + +1. getUst : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst → KILLED
+ +
+
+
    return ust;
+ +66 + + + + + + +
  }
+ +67 + + + + + + +
+ +68 + + + + + + +
  public void setUst(double ust) {
+ +69 + + + + + + +
    this.ust = ust;
+ +70 + + + + + + +
  }
+ +71 + + + + + + +
+ +72 + + + + + + +
  public double getSummeBrutto() {
+ +73 + + +1 + +1. getSummeBrutto : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto → KILLED
+ +
+
+
    return summeBrutto;
+ +74 + + + + + + +
  }
+ +75 + + + + + + +
+ +76 + + + + + + +
  public void setSummeBrutto(double summeBrutto) {
+ +77 + + + + + + +
    this.summeBrutto = summeBrutto;
+ +78 + + + + + + +
  }
+ +79 + + + + + + +
+ +80 + + + + + + +
  public boolean isBezahlt() {
+ +81 + + +2 + +1. isBezahlt : replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED
+2. isBezahlt : replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED
+ +
+
+
    return bezahlt;
+ +82 + + + + + + +
  }
+ +83 + + + + + + +
+ +84 + + + + + + +
  public void setBezahlt(boolean bezahlt) {
+ +85 + + + + + + +
    this.bezahlt = bezahlt;
+ +86 + + + + + + +
  }
+ +87 + + + + + + +
+ +88 + + + + + + +
  public Date getBezahltAm() {
+ +89 + + +1 + +1. getBezahltAm : replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm → KILLED
+ +
+
+
    return bezahltAm;
+ +90 + + + + + + +
  }
+ +91 + + + + + + +
+ +92 + + + + + + +
  public void setBezahltAm(Date bezahltAm) {
+ +93 + + + + + + +
    this.bezahltAm = bezahltAm;
+ +94 + + + + + + +
  }
+ +95 + + + + + + +
+ +96 + + + + + + +
  public String getAuftragNr() {
+ +97 + + +1 + +1. getAuftragNr : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr → KILLED
+ +
+
+
    return auftragNr;
+ +98 + + + + + + +
  }
+ +99 + + + + + + +
+ +100 + + + + + + +
  public void setAuftragNr(String auftragNr) {
+ +101 + + + + + + +
    this.auftragNr = auftragNr;
+ +102 + + + + + + +
  }
+ +103 + + + + + + +
+ +104 + + + + + + +
  public String getKundeName() {
+ +105 + + +1 + +1. getKundeName : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName → KILLED
+ +
+
+
    return kundeName;
+ +106 + + + + + + +
  }
+ +107 + + + + + + +
+ +108 + + + + + + +
  public void setKundeName(String kundeName) {
+ +109 + + + + + + +
    this.kundeName = kundeName;
+ +110 + + + + + + +
  }
+ +111 + + + + + + +
}

Mutations

25 + + + +

1.1
Location : getId
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetId()]
replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId → KILLED + +

33 + + + +

1.1
Location : getRechnungNr
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetRechnungNr_null()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr → KILLED + +

41 + + + +

1.1
Location : getAuftragId
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:defaultConstructor_initializesFieldsToDefaults()]
replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId → KILLED + +

49 + + + +

1.1
Location : getAusgestelltAm
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAusgestelltAm()]
replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm → KILLED + +

57 + + + +

1.1
Location : getSummeNetto
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeNetto_negative()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto → KILLED + +

65 + + + +

1.1
Location : getUst
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetUst()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst → KILLED + +

73 + + + +

1.1
Location : getSummeBrutto
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeBrutto()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto → KILLED + +

81 + + + +

1.1
Location : isBezahlt
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndIsBezahlt_true()]
replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED +

2.2
Location : isBezahlt
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndIsBezahlt_false()]
replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED + +

89 + + + +

1.1
Location : getBezahltAm
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetBezahltAm()]
replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm → KILLED + +

97 + + + +

1.1
Location : getAuftragNr
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragNr()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr → KILLED + +

105 + + + +

1.1
Location : getKundeName
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetKundeName()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeNetto_negative()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:defaultConstructor_initializesFieldsToDefaults()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeNetto()] (2 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsTogether_independentState()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetBezahltAm()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetBezahltAm_null()] (4 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetUst()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetUst_zero()] (2 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndIsBezahlt_false()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndIsBezahlt_true()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragNr()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragNr_null()] (6 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragId()] (3 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragId_null()] (565 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeBrutto()] (2 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeBrutto_negative()] (7 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAusgestelltAm()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAusgestelltAm_null()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetKundeName()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetKundeName_null()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetRechnungNr_null()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetRechnungNr()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetId()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetId_null()] (2 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html new file mode 100644 index 0000000..1769b88 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.model

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
34/34
100%
12/12
100%
12/12
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
Rechnung.java
100%
34/34
100%
12/12
100%
12/12
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..cd5efb0 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
34/34
100%
12/12
100%
12/12
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.model1
100%
34/34
100%
12/12
100%
12/12
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..7e0877a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,15 @@ + + +Rechnung.javaat.werkstatt.crm.model.RechnunggetAuftragId()Ljava/lang/Long;41org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:defaultConstructor_initializesFieldsToDefaults()]replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId +Rechnung.javaat.werkstatt.crm.model.RechnunggetAuftragNr()Ljava/lang/String;97org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAuftragNr()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr +Rechnung.javaat.werkstatt.crm.model.RechnunggetAusgestelltAm()Ljava/util/Date;49org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetAusgestelltAm()]replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm +Rechnung.javaat.werkstatt.crm.model.RechnunggetBezahltAm()Ljava/util/Date;89org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetBezahltAm()]replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm +Rechnung.javaat.werkstatt.crm.model.RechnunggetId()Ljava/lang/Long;25org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetId()]replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId +Rechnung.javaat.werkstatt.crm.model.RechnunggetKundeName()Ljava/lang/String;105org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetKundeName()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName +Rechnung.javaat.werkstatt.crm.model.RechnunggetRechnungNr()Ljava/lang/String;33org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetRechnungNr_null()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr +Rechnung.javaat.werkstatt.crm.model.RechnunggetSummeBrutto()D73org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeBrutto()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto +Rechnung.javaat.werkstatt.crm.model.RechnunggetSummeNetto()D57org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetSummeNetto_negative()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto +Rechnung.javaat.werkstatt.crm.model.RechnunggetUst()D65org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndGetUst()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst +Rechnung.javaat.werkstatt.crm.model.RechnungisBezahlt()Z81org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndIsBezahlt_true()]replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt +Rechnung.javaat.werkstatt.crm.model.RechnungisBezahlt()Z81org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:setAndIsBezahlt_false()]replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt + diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml new file mode 100644 index 0000000..d137f2a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt new file mode 100644 index 0000000..7b5ea95 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungGeneratedTest +------------------------------------------------------------------------------- +Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.959 s -- in at.werkstatt.crm.gen.RechnungGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/repaired/RechnungGeneratedTest.java b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/repaired/RechnungGeneratedTest.java new file mode 100644 index 0000000..b69a19d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s4-rechnung/repaired/RechnungGeneratedTest.java @@ -0,0 +1,208 @@ +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; + +import at.werkstatt.crm.model.Rechnung; +import java.util.Date; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class RechnungGeneratedTest { + + private Rechnung rechnung; + + @BeforeEach + void setUp() { + rechnung = new Rechnung(); + } + + @Test + void defaultConstructor_initializesFieldsToDefaults() { + assertThat(rechnung.getId()).isNull(); + assertThat(rechnung.getRechnungNr()).isNull(); + assertThat(rechnung.getAuftragId()).isNull(); + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(0.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(0.0); + assertThat(rechnung.isBezahlt()).isFalse(); + assertThat(rechnung.getBezahltAm()).isNull(); + assertThat(rechnung.getAuftragNr()).isNull(); + assertThat(rechnung.getKundeName()).isNull(); + } + + @Test + void setAndGetId() { + rechnung.setId(42L); + assertThat(rechnung.getId()).isEqualTo(42L); + } + + @Test + void setAndGetId_null() { + rechnung.setId(1L); + rechnung.setId(null); + assertThat(rechnung.getId()).isNull(); + } + + @Test + void setAndGetRechnungNr() { + rechnung.setRechnungNr("RE-2024-001"); + assertThat(rechnung.getRechnungNr()).isEqualTo("RE-2024-001"); + } + + @Test + void setAndGetRechnungNr_null() { + rechnung.setRechnungNr("RE-1"); + rechnung.setRechnungNr(null); + assertThat(rechnung.getRechnungNr()).isNull(); + } + + @Test + void setAndGetAuftragId() { + rechnung.setAuftragId(7L); + assertThat(rechnung.getAuftragId()).isEqualTo(7L); + } + + @Test + void setAndGetAuftragId_null() { + rechnung.setAuftragId(7L); + rechnung.setAuftragId(null); + assertThat(rechnung.getAuftragId()).isNull(); + } + + @Test + void setAndGetAusgestelltAm() { + Date now = new Date(); + rechnung.setAusgestelltAm(now); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(now); + } + + @Test + void setAndGetAusgestelltAm_null() { + rechnung.setAusgestelltAm(new Date()); + rechnung.setAusgestelltAm(null); + assertThat(rechnung.getAusgestelltAm()).isNull(); + } + + @Test + void setAndGetSummeNetto() { + rechnung.setSummeNetto(123.45); + assertThat(rechnung.getSummeNetto()).isEqualTo(123.45); + } + + @Test + void setAndGetSummeNetto_negative() { + rechnung.setSummeNetto(-50.0); + assertThat(rechnung.getSummeNetto()).isEqualTo(-50.0); + } + + @Test + void setAndGetUst() { + rechnung.setUst(20.5); + assertThat(rechnung.getUst()).isEqualTo(20.5); + } + + @Test + void setAndGetUst_zero() { + rechnung.setUst(0.0); + assertThat(rechnung.getUst()).isEqualTo(0.0); + } + + @Test + void setAndGetSummeBrutto() { + rechnung.setSummeBrutto(200.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(200.0); + } + + @Test + void setAndGetSummeBrutto_negative() { + rechnung.setSummeBrutto(-1.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(-1.0); + } + + @Test + void setAndIsBezahlt_true() { + rechnung.setBezahlt(true); + assertThat(rechnung.isBezahlt()).isTrue(); + } + + @Test + void setAndIsBezahlt_false() { + rechnung.setBezahlt(true); + rechnung.setBezahlt(false); + assertThat(rechnung.isBezahlt()).isFalse(); + } + + @Test + void setAndGetBezahltAm() { + Date d = new Date(); + rechnung.setBezahltAm(d); + assertThat(rechnung.getBezahltAm()).isEqualTo(d); + } + + @Test + void setAndGetBezahltAm_null() { + rechnung.setBezahltAm(new Date()); + rechnung.setBezahltAm(null); + assertThat(rechnung.getBezahltAm()).isNull(); + } + + @Test + void setAndGetAuftragNr() { + rechnung.setAuftragNr("AU-100"); + assertThat(rechnung.getAuftragNr()).isEqualTo("AU-100"); + } + + @Test + void setAndGetAuftragNr_null() { + rechnung.setAuftragNr("AU-100"); + rechnung.setAuftragNr(null); + assertThat(rechnung.getAuftragNr()).isNull(); + } + + @Test + void setAndGetKundeName() { + rechnung.setKundeName("Max Mustermann"); + assertThat(rechnung.getKundeName()).isEqualTo("Max Mustermann"); + } + + @Test + void setAndGetKundeName_null() { + rechnung.setKundeName("Max Mustermann"); + rechnung.setKundeName(null); + assertThat(rechnung.getKundeName()).isNull(); + } + + @Test + void allFieldsTogether_independentState() { + Date ausgestellt = new Date(1000L); + Date bezahltAm = new Date(2000L); + + rechnung.setId(1L); + rechnung.setRechnungNr("RE-1"); + rechnung.setAuftragId(2L); + rechnung.setAusgestelltAm(ausgestellt); + rechnung.setSummeNetto(100.0); + rechnung.setUst(20.0); + rechnung.setSummeBrutto(120.0); + rechnung.setBezahlt(true); + rechnung.setBezahltAm(bezahltAm); + rechnung.setAuftragNr("AU-1"); + rechnung.setKundeName("Kunde X"); + + assertThat(rechnung.getId()).isEqualTo(1L); + assertThat(rechnung.getRechnungNr()).isEqualTo("RE-1"); + assertThat(rechnung.getAuftragId()).isEqualTo(2L); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(ausgestellt); + assertThat(rechnung.getSummeNetto()).isEqualTo(100.0); + assertThat(rechnung.getUst()).isEqualTo(20.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(120.0); + assertThat(rechnung.isBezahlt()).isTrue(); + assertThat(rechnung.getBezahltAm()).isEqualTo(bezahltAm); + assertThat(rechnung.getAuftragNr()).isEqualTo("AU-1"); + assertThat(rechnung.getKundeName()).isEqualTo("Kunde X"); + } +} diff --git a/ai-testgen/runs/2026-07-31/fix-log.csv b/ai-testgen/runs/2026-07-31/fix-log.csv new file mode 100644 index 0000000..f83a3c1 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/fix-log.csv @@ -0,0 +1,53 @@ +cell,timestamp,category,description +M1-A-s4-rechnung,2026-08-02T10:50:54+02:00,IMPORT/SYNTAX,fixed malformed static import org.assertj.org.assertj.core.api.Assertions.assertThat -> org.assertj.core.api.Assertions.assertThat; the only compile error in the extracted artifact +M2-B-s2-kunden,2026-08-02T11:11:42+02:00,IMPORT/SYNTAX,added missing import org.springframework.http.ResponseEntity; unresolved in 6 places +M2-B-s2-kunden,2026-08-02T11:11:42+02:00,IMPORT/SYNTAX,added missing import org.mockito.ArgumentCaptor; unresolved in 2 places +M2-B-s2-kunden,2026-08-02T11:12:13+02:00,IMPORT/SYNTAX,ResponseEntity.getStatusCodeValue() removed in Spring Framework 7 (Boot 4); replaced 6 call sites with getStatusCode().value() +M2-A-s1-werkstattservice,2026-08-02T11:13:00+02:00,IMPORT/SYNTAX,added missing import at.werkstatt.crm.service.WerkstattService (the class under test was never imported) +M2-A-s1-werkstattservice,2026-08-02T11:13:10+02:00,IMPORT/SYNTAX,Date ambiguous between the java.sql.* and java.util.* wildcard imports in getAlleFahrzeuge test; qualified as java.sql.Date +M2-A-s1-werkstattservice,2026-08-02T11:13:30+02:00,MOCKING-SETUP,neuerAuftrag: chained thenReturn mixed Integer and Long on one queryForObject overload; split into an Integer max stub and a Long insert stub and stubbed the trailing getAuftrag query +M2-A-s1-werkstattservice,2026-08-02T11:13:45+02:00,MOCKING-SETUP,erstelleRechnung amounts: chained thenReturn on query() mixed List/int/long; split into per-SQL queryForObject stubs plus a two-step query stub (auftrag then positionen) +M2-A-s1-werkstattservice,2026-08-02T11:14:20+02:00,IMPORT/SYNTAX,two thenAnswer stubs assigned to a non-final local RowMapper declared outside the lambda; moved the declaration inside the lambda (getAlleFahrzeuge and getMonatsBericht tests) +M2-A-s1-werkstattservice,2026-08-02T11:14:25+02:00,IMPORT/SYNTAX,getMonatsBericht test stubs ResultSet getters but lacked throws SQLException on the method signature; added it +M2-A-s1-werkstattservice,2026-08-02T11:15:30+02:00,WRONG-EXPECTATION,five verifies expected jdbcTemplate.update(sql; id) but the legacy code concatenates the id into the SQL and calls the single-argument update; changed to update(sqlCaptor.capture()) in loescheKunde/loescheFahrzeug/loeschePosition/setzeBezahlt/setzeStatus +M2-A-s1-werkstattservice,2026-08-02T11:15:35+02:00,WRONG-EXPECTATION,bereinigeStornierte expected times(2) update(sql; anyLong); actual behaviour is 4 single-argument updates (two per id); changed to times(4) update(sqlCaptor.capture()) +M2-A-s1-werkstattservice,2026-08-02T11:15:40+02:00,WRONG-EXPECTATION,getAdminStatistik expected a map of size 8; the method puts exactly 7 entries; changed to hasSize(7) +M2-A-s1-werkstattservice,2026-08-02T11:15:45+02:00,MOCKING-SETUP,speichereKunde_insertsNewKunde: no stub for the getKunde re-read after the INSERT so the method returned null and the assertion NPEd; stubbed query() to return the kunde +M2-A-s1-werkstattservice,2026-08-02T11:15:55+02:00,WRONG-EXPECTATION,setzeStatus (two tests) asserted the returned Auftrag carries the new status; the code writes the status via SQL and re-reads through the mock so the returned object is unchanged; assert the UPDATE SQL contains the new status instead +M2-A-s1-werkstattservice,2026-08-02T11:16:00+02:00,WRONG-EXPECTATION,setzeStatus_setsTimestampsForStatusChanges started from ANGENOMMEN and moved to FERTIG which the state machine forbids; fixture start status corrected to IN_ARBEIT +M2-A-s1-werkstattservice,2026-08-02T11:16:05+02:00,MOCKING-SETUP,erstelleRechnung_throwsExceptionIfRechnungAlreadyExists stubbed the existing-invoice count on query() instead of queryForObject; the list leaked into getPositionen and caused a ClassCastException; moved the count to queryForObject(Integer.class) +M2-A-s1-werkstattservice,2026-08-02T11:16:10+02:00,WRONG-EXPECTATION,erstelleRechnung amounts asserted on the returned Rechnung; with a mocked JdbcTemplate the computed netto/ust/brutto are only observable as the INSERT arguments; recorded them via thenAnswer and asserted there (a single varargs ArgumentCaptor did not match the 5-arg call) +M2-A-s3-admin,2026-08-02T11:13:52+02:00,IMPORT/SYNTAX,missing static import of org.assertj.core.api.Assertions.assertThatCode; the two Phase A compile errors +M2-A-s3-admin,2026-08-02T11:13:52+02:00,IMPORT/SYNTAX,package was declared at.werkstatt.crm.controller instead of the required at.werkstatt.crm.gen; corrected and added import of AdminController +M2-A-s3-admin,2026-08-02T11:13:52+02:00,MOCKING-SETUP,ReflectionUtils.setField called on the private werkstattService field without makeAccessible; added ReflectionUtils.makeAccessible before setField +M2-A-s3-admin,2026-08-02T11:13:52+02:00,MOCKING-SETUP,verify() mixed raw String literals with matchers/captors (InvalidUseOfMatchersException); wrapped the attribute names in eq() +M2-A-s3-admin,2026-08-02T11:13:52+02:00,WRONG-EXPECTATION,firmaName and version are @Value fields and stay null in a plain unit test; any(String.class) does not match null so those matchers were aligned to isNull() +M2-B-s4-rechnung,2026-08-02T11:14:43+02:00,IMPORT/SYNTAX,added missing import at.werkstatt.crm.model.Rechnung; class under test was referenced unqualified from package at.werkstatt.crm.gen +M2-B-s1-werkstattservice,2026-08-02T10:50:01+02:00,IMPORT/SYNTAX,three test method names contained literal spaces; renamed to valid identifiers +M2-B-s1-werkstattservice,2026-08-02T10:50:01+02:00,IMPORT/SYNTAX,missing import of the class under test at.werkstatt.crm.service.WerkstattService +M2-B-s1-werkstattservice,2026-08-02T10:51:18+02:00,MOCKING-SETUP,bare any() in JdbcTemplate.query/queryForObject/queryForList was ambiguous across RowMapper ResultSetExtractor RowCallbackHandler overloads; typed to any(RowMapper.class)/any(Class.class) +M2-B-s1-werkstattservice,2026-08-02T10:53:00+02:00,MOCKING-SETUP,auftrag and auftrag_position queries shared the same eq(1L) matcher so the second stub shadowed the first; discriminated by SQL via contains() +M2-B-s1-werkstattservice,2026-08-02T10:53:00+02:00,MOCKING-SETUP,getAlleKunden calls the 2-arg query overload; stub and verify targeted the varargs overload +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,MOCKING-SETUP,insert stubs used anyList() for the JdbcTemplate varargs so they never matched; replaced by any(Object[].class) +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,MOCKING-SETUP,re-read after insert (getKunde/getFahrzeug for the new id) was unstubbed; added the stub so the returned entity is non-null +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,MOCKING-SETUP,setzeStatus asserts the re-read status; stubbed successive returns so the second read returns the updated row +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,MOCKING-SETUP,erstelleRechnung success fixture carried only brutto; netto and ust set on the stubbed re-read row +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,WRONG-EXPECTATION,sucheKunden builds %% for empty input and %mueller% with umlaut for Mueller; test expected % and the umlaut-free form +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,WRONG-EXPECTATION,auftrag and rechnung number prefixes are built from the current year; hardcoded A-2025-% / R-2025-% never matched +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,WRONG-EXPECTATION,three hasMessage assertions used substrings; aligned to the full actual exception messages +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,WRONG-EXPECTATION,setzeBezahlt passes only the id (bezahlt = true is inline SQL); verify expected an extra true argument +M2-B-s1-werkstattservice,2026-08-02T10:57:00+02:00,WRONG-EXPECTATION,duplicate-invoice check uses queryForObject COUNT not queryForList; stub aligned to the real call +M2-B-s1-werkstattservice,2026-08-02T10:57:12+02:00,MOCKING-SETUP,verify update(anyString(); any()) was ambiguous against the PreparedStatementSetter overload; switched to any(Object[].class) +M2-B-s1-werkstattservice,2026-08-02T10:58:10+02:00,MOCKING-SETUP,any() matches only a single vararg so the multi-parameter insert stubs still missed; switched every varargs matcher to any(Object[].class) +M2-B-s3-admin,2026-08-02T11:13:33+02:00,IMPORT/SYNTAX,added missing import at.werkstatt.crm.controller.AdminController; class under test was never imported so all 4 compile errors were cannot-find-symbol AdminController +M2-B-s2-rechnung,2026-08-02T11:11:33+02:00,IMPORT/SYNTAX,added missing import org.springframework.http.ResponseEntity; only compile error; 8 of 9 test methods referenced the type +M2-A-s4-rechnung,2026-08-02T10:50:10+02:00,IMPORT/SYNTAX,Added missing import at.werkstatt.crm.model.Rechnung; class under test referenced unqualified in all 10 test methods +M2-B-s2-auftrag,2026-08-02T11:12:13+02:00,STRUCTURAL,A2.4 truncation salvage: stripped the leading java code-fence line; dropped the 135th test method which was cut off mid-body; closed the class brace +M2-B-s2-auftrag,2026-08-02T11:13:39+02:00,IMPORT/SYNTAX,added missing static import org.mockito.Mockito.doNothing (used in 2 tests) +M2-B-s2-auftrag,2026-08-02T11:13:39+02:00,IMPORT/SYNTAX,ResponseEntity body is Object: added casts to Auftrag (15 sites) and AuftragPosition (4 sites) before the getter calls +M2-B-s2-auftrag,2026-08-02T11:13:39+02:00,IMPORT/SYNTAX,removed call to invented setter Auftrag.setSummeNetto(double); summeNetto is a derived read-only getter +M2-B-s2-auftrag,2026-08-02T11:15:19+02:00,WRONG-EXPECTATION,40 sites asserted the 500 body equals the string "null" for an exception without message; e.getMessage() is null so the body is null -> isNull() +M2-B-s2-auftrag,2026-08-02T11:15:19+02:00,WRONG-EXPECTATION,11 sites expected liste() to swallow a service exception and return an empty list; liste has no try/catch so the exception propagates -> catchThrowable + isInstanceOf +M2-A-s2-auftrag,2026-08-02T11:12:40+02:00,MOCKING-SETUP,positionWithNullPosition line 282 mixed matcher eq(1L) with raw null second arg -> InvalidUseOfMatchersException; switched to raw values neuePosition(1L; null) +M2-A-s2-auftrag,2026-08-02T11:12:50+02:00,MOCKING-SETUP,positionWithNullIdInPosition line 329 mixed matcher eq(1L) with raw object second arg -> InvalidUseOfMatchersException; switched to raw values neuePosition(1L; positionWithoutId) +M2-A-s2-auftrag,2026-08-02T11:13:00+02:00,WRONG-EXPECTATION,listeMitStatusFilter asserted the returned Auftrag status equals the filter IN_ARBEIT but the stubbed fixture carries STATUS_ANGENOMMEN and the controller passes the service result through unchanged; aligned the assertion to STATUS_ANGENOMMEN diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/measurements-repaired.csv b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/measurements-repaired.csv new file mode 100644 index 0000000..6f2af39 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/measurements-repaired.csv @@ -0,0 +1,7 @@ +unit,classUnderTest,compile,testsRun,failures,errors,lineCovered,lineMissed,branchCovered,branchMissed,mutationsGenerated,mutationsKilled +s1-werkstattservice,at.werkstatt.crm.service.WerkstattService,OK,36,0,0,177,33,51,19,111,62 +s2-auftragcontroller,at.werkstatt.crm.controller.AuftragController,OK,22,0,0,19,0,2,0,13,13 +s2-kundencontroller,at.werkstatt.crm.controller.KundenController,OK,13,0,0,19,0,6,0,17,16 +s2-rechnungcontroller,at.werkstatt.crm.controller.RechnungController,OK,10,0,0,12,0,2,0,8,8 +s3-admincontroller,at.werkstatt.crm.controller.AdminController,OK,11,0,0,17,0,0,0,2,2 +s4-rechnung,at.werkstatt.crm.model.Rechnung,OK,10,0,0,35,0,0,0,12,12 diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..0fc652b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/maven-test.log new file mode 100644 index 0000000..aa00f3d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/maven-test.log @@ -0,0 +1,214 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @27c86f2d (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java uses unchecked or unsafe operations. +[INFO] /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java: Recompile with -Xlint:unchecked for details. +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.WerkstattServiceGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +log4j:WARN Please initialize the log4j system properly. +log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +Rechnung R-2026-0043 erstellt, brutto 240.0 +Loesche Kunde 1 +[INFO] Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.270 s -- in at.werkstatt.crm.gen.WerkstattServiceGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 36, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:20:32 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:20:32 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:20:32 AM PIT >> INFO : Sending 1 test classes to minion +11:20:32 AM PIT >> INFO : Sent tests to minion +11:20:33 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:20:34 AM PIT >> INFO : MINION : log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +11:20:34 AM PIT >> INFO : MINION : log4j:WARN Please initialize the log4j system properly. +11:20:34 AM PIT >> INFO : MINION : log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|11:20:35 AM PIT >> INFO : Calculated coverage in 2 seconds. +11:20:35 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:20:35 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returnsBerichtForYear()]) took 1549 ms +11:20:35 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]) covered 89 blocks +11:20:35 AM PIT >> INFO : Created 1 mutation test units +/11:20:44 AM PIT >> INFO : Completed in 12 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator +>> Generated 2 Killed 1 (50%) +> KILLED 1 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 39 Killed 8 (21%) +> KILLED 8 SURVIVED 12 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 19 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 14 Killed 7 (50%) +> KILLED 7 SURVIVED 5 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 2 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.MathMutator +>> Generated 11 Killed 11 (100%) +> KILLED 11 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 11 Killed 9 (82%) +> KILLED 9 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 2 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 33 Killed 25 (76%) +> KILLED 25 SURVIVED 5 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 3 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 2 seconds +> build mutation tests : < 1 second +> run mutation analysis : 9 seconds +-------------------------------------------------------------------------------- +> Total : 12 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returnsBerichtForYear()]) took 1549 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]) covered 89 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 177/210 (84%) +>> 1 tests examined +>> Generated 111 mutations Killed 62 (56%) +>> Mutations with no coverage 26. Test strength 73% +>> Ran 101 tests (0.91 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 21.910 s +[INFO] Finished at: 2026-08-02T11:20:44+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html new file mode 100644 index 0000000..aeb8148 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html @@ -0,0 +1,10035 @@ + + + + + + + + + +

WerkstattService.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.service;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.sql.ResultSet;
+ +4 + + + + + + +
import java.sql.SQLException;
+ +5 + + + + + + +
import java.text.SimpleDateFormat;
+ +6 + + + + + + +
import java.util.Calendar;
+ +7 + + + + + + +
import java.util.Date;
+ +8 + + + + + + +
import java.util.HashMap;
+ +9 + + + + + + +
import java.util.List;
+ +10 + + + + + + +
import java.util.Map;
+ +11 + + + + + + +
+ +12 + + + + + + +
import org.apache.log4j.Logger;
+ +13 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +14 + + + + + + +
import org.springframework.beans.factory.annotation.Value;
+ +15 + + + + + + +
import org.springframework.jdbc.core.JdbcTemplate;
+ +16 + + + + + + +
import org.springframework.jdbc.core.RowMapper;
+ +17 + + + + + + +
import org.springframework.stereotype.Service;
+ +18 + + + + + + +
+ +19 + + + + + + +
import at.werkstatt.crm.model.Auftrag;
+ +20 + + + + + + +
import at.werkstatt.crm.model.AuftragPosition;
+ +21 + + + + + + +
import at.werkstatt.crm.model.Fahrzeug;
+ +22 + + + + + + +
import at.werkstatt.crm.model.Kunde;
+ +23 + + + + + + +
import at.werkstatt.crm.model.MonatsBericht;
+ +24 + + + + + + +
import at.werkstatt.crm.model.Rechnung;
+ +25 + + + + + + +
+ +26 + + + + + + +
/**
+ +27 + + + + + + +
 * Zentrale Service-Klasse der Werkstatt. Hier ist ueber die Jahre alles
+ +28 + + + + + + +
 * zusammengewachsen: Kunden, Fahrzeuge, Auftraege, Rechnungen, Berichte.
+ +29 + + + + + + +
 *
+ +30 + + + + + + +
 * ACHTUNG: Bitte nichts umbauen ohne Ruecksprache mit Hrn. B.! Die
+ +31 + + + + + + +
 * Rechnungslogik haengt am Statusfluss der Auftraege.
+ +32 + + + + + + +
 */
+ +33 + + + + + + +
@Service
+ +34 + + + + + + +
public class WerkstattService {
+ +35 + + + + + + +
+ +36 + + + + + + +
	private static final Logger LOG = Logger.getLogger(WerkstattService.class);
+ +37 + + + + + + +
+ +38 + + + + + + +
	// eine Instanz fuer alle Threads, hat bis jetzt eh immer funktioniert
+ +39 + + + + + + +
	private static final SimpleDateFormat DATUM = new SimpleDateFormat("dd.MM.yyyy");
+ +40 + + + + + + +
+ +41 + + + + + + +
	@Autowired
+ +42 + + + + + + +
	private JdbcTemplate jdbcTemplate;
+ +43 + + + + + + +
+ +44 + + + + + + +
	@Value("${werkstatt.ust.satz:20}")
+ +45 + + + + + + +
	private int ustSatz;
+ +46 + + + + + + +
+ +47 + + + + + + +
	// =====================================================================
+ +48 + + + + + + +
	// KUNDEN
+ +49 + + + + + + +
	// =====================================================================
+ +50 + + + + + + +
+ +51 + + + + + + +
	public List<Kunde> getAlleKunden() {
+ +52 + + + + + + +
		String sql = "SELECT * FROM kunde ORDER BY nachname, vorname";
+ +53 + + +1 + +1. getAlleKunden : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleKunden → KILLED
+ +
+
+
		return jdbcTemplate.query(sql, new RowMapper<Kunde>() {
+ +54 + + + + + + +
			public Kunde mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +55 + + + + + + +
				Kunde k = new Kunde();
+ +56 + + + + + + +
				k.setId(rs.getLong("id"));
+ +57 + + + + + + +
				k.setAnrede(rs.getString("anrede"));
+ +58 + + + + + + +
				k.setVorname(rs.getString("vorname"));
+ +59 + + + + + + +
				k.setNachname(rs.getString("nachname"));
+ +60 + + + + + + +
				k.setTelefon(rs.getString("telefon"));
+ +61 + + + + + + +
				k.setEmail(rs.getString("email"));
+ +62 + + + + + + +
				k.setStrasse(rs.getString("strasse"));
+ +63 + + + + + + +
				k.setPlz(rs.getString("plz"));
+ +64 + + + + + + +
				k.setOrt(rs.getString("ort"));
+ +65 + + + + + + +
				k.setNotiz(rs.getString("notiz"));
+ +66 + + + + + + +
				k.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +67 + + + + + + +
				return k;
+ +68 + + + + + + +
			}
+ +69 + + + + + + +
		});
+ +70 + + + + + + +
	}
+ +71 + + + + + + +
+ +72 + + + + + + +
	/**
+ +73 + + + + + + +
	 * Suche wie sie 2016 halt gemacht wurde. Funktioniert, solange niemand
+ +74 + + + + + + +
	 * boese ist. TODO: irgendwann auf Prepared Statements umstellen (Hr. B., 11/2017)
+ +75 + + + + + + +
	 */
+ +76 + + + + + + +
	public List<Kunde> sucheKunden(String suchbegriff) {
+ +77 + + + + + + +
		// Achtung: Suchbegriff wird direkt in das SQL eingebaut!
+ +78 + + + + + + +
		String sql = "SELECT * FROM kunde WHERE lower(nachname) LIKE '%" + suchbegriff.toLowerCase()
+ +79 + + + + + + +
				+ "%' OR lower(vorname) LIKE '%" + suchbegriff.toLowerCase() + "%' OR lower(ort) LIKE '%"
+ +80 + + + + + + +
				+ suchbegriff.toLowerCase() + "%' ORDER BY nachname";
+ +81 + + + + + + +
		LOG.debug("Kundensuche: " + sql);
+ +82 + + +1 + +1. sucheKunden : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::sucheKunden → KILLED
+ +
+
+
		return jdbcTemplate.query(sql, new RowMapper<Kunde>() {
+ +83 + + + + + + +
			public Kunde mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +84 + + + + + + +
				// Mapping nochmal, war schneller als umbauen
+ +85 + + + + + + +
				Kunde k = new Kunde();
+ +86 + + + + + + +
				k.setId(rs.getLong("id"));
+ +87 + + + + + + +
				k.setAnrede(rs.getString("anrede"));
+ +88 + + + + + + +
				k.setVorname(rs.getString("vorname"));
+ +89 + + + + + + +
				k.setNachname(rs.getString("nachname"));
+ +90 + + + + + + +
				k.setTelefon(rs.getString("telefon"));
+ +91 + + + + + + +
				k.setEmail(rs.getString("email"));
+ +92 + + + + + + +
				k.setStrasse(rs.getString("strasse"));
+ +93 + + + + + + +
				k.setPlz(rs.getString("plz"));
+ +94 + + + + + + +
				k.setOrt(rs.getString("ort"));
+ +95 + + + + + + +
				k.setNotiz(rs.getString("notiz"));
+ +96 + + + + + + +
				k.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +97 + + + + + + +
				return k;
+ +98 + + + + + + +
			}
+ +99 + + + + + + +
		});
+ +100 + + + + + + +
	}
+ +101 + + + + + + +
+ +102 + + + + + + +
	public Kunde getKunde(long id) {
+ +103 + + + + + + +
		List<Kunde> liste = jdbcTemplate.query("SELECT * FROM kunde WHERE id = " + id, new RowMapper<Kunde>() {
+ +104 + + + + + + +
			public Kunde mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +105 + + + + + + +
				Kunde k = new Kunde();
+ +106 + + + + + + +
				k.setId(rs.getLong("id"));
+ +107 + + + + + + +
				k.setAnrede(rs.getString("anrede"));
+ +108 + + + + + + +
				k.setVorname(rs.getString("vorname"));
+ +109 + + + + + + +
				k.setNachname(rs.getString("nachname"));
+ +110 + + + + + + +
				k.setTelefon(rs.getString("telefon"));
+ +111 + + + + + + +
				k.setEmail(rs.getString("email"));
+ +112 + + + + + + +
				k.setStrasse(rs.getString("strasse"));
+ +113 + + + + + + +
				k.setPlz(rs.getString("plz"));
+ +114 + + + + + + +
				k.setOrt(rs.getString("ort"));
+ +115 + + + + + + +
				k.setNotiz(rs.getString("notiz"));
+ +116 + + + + + + +
				k.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +117 + + + + + + +
				return k;
+ +118 + + + + + + +
			}
+ +119 + + + + + + +
		});
+ +120 + + +1 + +1. getKunde : negated conditional → KILLED
+ +
+
+
		if (liste.isEmpty()) {
+ +121 + + + + + + +
			return null;
+ +122 + + + + + + +
		}
+ +123 + + +1 + +1. getKunde : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getKunde → KILLED
+ +
+
+
		return liste.get(0);
+ +124 + + + + + + +
	}
+ +125 + + + + + + +
+ +126 + + + + + + +
	public Kunde speichereKunde(Kunde kunde) {
+ +127 + + +1 + +1. speichereKunde : negated conditional → KILLED
+ +
+
+
		if (kunde.getId() == null) {
+ +128 + + + + + + +
			Long neueId = jdbcTemplate.queryForObject(
+ +129 + + + + + + +
					"INSERT INTO kunde (anrede, vorname, nachname, telefon, email, strasse, plz, ort, notiz, angelegt_am) "
+ +130 + + + + + + +
							+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, now()) RETURNING id",
+ +131 + + + + + + +
					Long.class, kunde.getAnrede(), kunde.getVorname(), kunde.getNachname(), kunde.getTelefon(),
+ +132 + + + + + + +
					kunde.getEmail(), kunde.getStrasse(), kunde.getPlz(), kunde.getOrt(), kunde.getNotiz());
+ +133 + + +1 + +1. speichereKunde : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
			kunde.setId(neueId);
+ +134 + + + + + + +
			LOG.info("Kunde angelegt: " + kunde.getAnzeigeName() + " (id=" + neueId + ")");
+ +135 + + + + + + +
		} else {
+ +136 + + + + + + +
			jdbcTemplate.update(
+ +137 + + + + + + +
					"UPDATE kunde SET anrede=?, vorname=?, nachname=?, telefon=?, email=?, strasse=?, plz=?, ort=?, notiz=? WHERE id=?",
+ +138 + + + + + + +
					kunde.getAnrede(), kunde.getVorname(), kunde.getNachname(), kunde.getTelefon(), kunde.getEmail(),
+ +139 + + + + + + +
					kunde.getStrasse(), kunde.getPlz(), kunde.getOrt(), kunde.getNotiz(), kunde.getId());
+ +140 + + + + + + +
		}
+ +141 + + +1 + +1. speichereKunde : replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereKunde → KILLED
+ +
+
+
		return getKunde(kunde.getId());
+ +142 + + + + + + +
	}
+ +143 + + + + + + +
+ +144 + + + + + + +
	public void loescheKunde(long id) {
+ +145 + + + + + + +
		// Fahrzeuge und Auftraege bleiben stehen, hat noch nie Probleme gemacht
+ +146 + + +1 + +1. loescheKunde : removed call to java/io/PrintStream::println → SURVIVED
+ +
+
+
		System.out.println("Loesche Kunde " + id);
+ +147 + + + + + + +
		jdbcTemplate.update("DELETE FROM kunde WHERE id = " + id);
+ +148 + + + + + + +
	}
+ +149 + + + + + + +
+ +150 + + + + + + +
	// =====================================================================
+ +151 + + + + + + +
	// FAHRZEUGE
+ +152 + + + + + + +
	// =====================================================================
+ +153 + + + + + + +
+ +154 + + + + + + +
	public List<Fahrzeug> getAlleFahrzeuge() {
+ +155 + + + + + + +
		String sql = "SELECT f.*, k.nachname, k.vorname FROM fahrzeug f LEFT JOIN kunde k ON k.id = f.kunde_id ORDER BY f.kennzeichen";
+ +156 + + +1 + +1. getAlleFahrzeuge : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleFahrzeuge → KILLED
+ +
+
+
		return jdbcTemplate.query(sql, new RowMapper<Fahrzeug>() {
+ +157 + + + + + + +
			public Fahrzeug mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +158 + + + + + + +
				Fahrzeug f = mapFahrzeug(rs);
+ +159 + + + + + + +
				String nn = rs.getString("nachname");
+ +160 + + + + + + +
				String vn = rs.getString("vorname");
+ +161 + + + + + + +
				if (nn != null) {
+ +162 + + + + + + +
					f.setKundeName(nn + " " + (vn == null ? "" : vn));
+ +163 + + + + + + +
				}
+ +164 + + + + + + +
				return f;
+ +165 + + + + + + +
			}
+ +166 + + + + + + +
		});
+ +167 + + + + + + +
	}
+ +168 + + + + + + +
+ +169 + + + + + + +
	public List<Fahrzeug> getFahrzeugeZuKunde(long kundeId) {
+ +170 + + +1 + +1. getFahrzeugeZuKunde : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getFahrzeugeZuKunde → KILLED
+ +
+
+
		return jdbcTemplate.query("SELECT * FROM fahrzeug WHERE kunde_id = " + kundeId + " ORDER BY kennzeichen",
+ +171 + + + + + + +
				new RowMapper<Fahrzeug>() {
+ +172 + + + + + + +
					public Fahrzeug mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +173 + + + + + + +
						return mapFahrzeug(rs);
+ +174 + + + + + + +
					}
+ +175 + + + + + + +
				});
+ +176 + + + + + + +
	}
+ +177 + + + + + + +
+ +178 + + + + + + +
	public Fahrzeug getFahrzeug(long id) {
+ +179 + + + + + + +
		List<Fahrzeug> liste = jdbcTemplate.query("SELECT * FROM fahrzeug WHERE id = " + id, new RowMapper<Fahrzeug>() {
+ +180 + + + + + + +
			public Fahrzeug mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +181 + + + + + + +
				return mapFahrzeug(rs);
+ +182 + + + + + + +
			}
+ +183 + + + + + + +
		});
+ +184 + + +2 + +1. getFahrzeug : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getFahrzeug → KILLED
+2. getFahrzeug : negated conditional → KILLED
+ +
+
+
		return liste.isEmpty() ? null : liste.get(0);
+ +185 + + + + + + +
	}
+ +186 + + + + + + +
+ +187 + + + + + + +
	// die eine Stelle, an der das Mapping ausgelagert wurde (2018, Hr. F.)
+ +188 + + + + + + +
	private Fahrzeug mapFahrzeug(ResultSet rs) throws SQLException {
+ +189 + + + + + + +
		Fahrzeug f = new Fahrzeug();
+ +190 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setId → SURVIVED
+ +
+
+
		f.setId(rs.getLong("id"));
+ +191 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setKundeId → SURVIVED
+ +
+
+
		f.setKundeId(rs.getLong("kunde_id"));
+ +192 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setKennzeichen → SURVIVED
+ +
+
+
		f.setKennzeichen(rs.getString("kennzeichen"));
+ +193 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setMarke → SURVIVED
+ +
+
+
		f.setMarke(rs.getString("marke"));
+ +194 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setModell → SURVIVED
+ +
+
+
		f.setModell(rs.getString("modell"));
+ +195 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setFahrgestellnr → SURVIVED
+ +
+
+
		f.setFahrgestellnr(rs.getString("fahrgestellnr"));
+ +196 + + + + + + +
		int bj = rs.getInt("baujahr");
+ +197 + + +1 + +1. mapFahrzeug : negated conditional → SURVIVED
+ +
+
+
		if (!rs.wasNull()) {
+ +198 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setBaujahr → SURVIVED
+ +
+
+
			f.setBaujahr(bj);
+ +199 + + + + + + +
		}
+ +200 + + + + + + +
		int km = rs.getInt("km_stand");
+ +201 + + +1 + +1. mapFahrzeug : negated conditional → SURVIVED
+ +
+
+
		if (!rs.wasNull()) {
+ +202 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setKmStand → SURVIVED
+ +
+
+
			f.setKmStand(km);
+ +203 + + + + + + +
		}
+ +204 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setPickerlDatum → SURVIVED
+ +
+
+
		f.setPickerlDatum(rs.getDate("pickerl_datum"));
+ +205 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setAngelegtAm → SURVIVED
+ +
+
+
		f.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +206 + + +1 + +1. mapFahrzeug : replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapFahrzeug → KILLED
+ +
+
+
		return f;
+ +207 + + + + + + +
	}
+ +208 + + + + + + +
+ +209 + + + + + + +
	public Fahrzeug speichereFahrzeug(Fahrzeug fahrzeug) {
+ +210 + + +1 + +1. speichereFahrzeug : negated conditional → KILLED
+ +
+
+
		if (fahrzeug.getId() == null) {
+ +211 + + + + + + +
			Long neueId = jdbcTemplate.queryForObject(
+ +212 + + + + + + +
					"INSERT INTO fahrzeug (kunde_id, kennzeichen, marke, modell, fahrgestellnr, baujahr, km_stand, pickerl_datum, angelegt_am) "
+ +213 + + + + + + +
							+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, now()) RETURNING id",
+ +214 + + + + + + +
					Long.class, fahrzeug.getKundeId(), fahrzeug.getKennzeichen(), fahrzeug.getMarke(),
+ +215 + + + + + + +
					fahrzeug.getModell(), fahrzeug.getFahrgestellnr(), fahrzeug.getBaujahr(), fahrzeug.getKmStand(),
+ +216 + + + + + + +
					fahrzeug.getPickerlDatum());
+ +217 + + +1 + +1. speichereFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setId → KILLED
+ +
+
+
			fahrzeug.setId(neueId);
+ +218 + + + + + + +
		} else {
+ +219 + + + + + + +
			jdbcTemplate.update(
+ +220 + + + + + + +
					"UPDATE fahrzeug SET kunde_id=?, kennzeichen=?, marke=?, modell=?, fahrgestellnr=?, baujahr=?, km_stand=?, pickerl_datum=? WHERE id=?",
+ +221 + + + + + + +
					fahrzeug.getKundeId(), fahrzeug.getKennzeichen(), fahrzeug.getMarke(), fahrzeug.getModell(),
+ +222 + + + + + + +
					fahrzeug.getFahrgestellnr(), fahrzeug.getBaujahr(), fahrzeug.getKmStand(),
+ +223 + + + + + + +
					fahrzeug.getPickerlDatum(), fahrzeug.getId());
+ +224 + + + + + + +
		}
+ +225 + + +1 + +1. speichereFahrzeug : replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereFahrzeug → SURVIVED
+ +
+
+
		return getFahrzeug(fahrzeug.getId());
+ +226 + + + + + + +
	}
+ +227 + + + + + + +
+ +228 + + + + + + +
	public void loescheFahrzeug(long id) {
+ +229 + + + + + + +
		jdbcTemplate.update("DELETE FROM fahrzeug WHERE id = " + id);
+ +230 + + + + + + +
	}
+ +231 + + + + + + +
+ +232 + + + + + + +
	// =====================================================================
+ +233 + + + + + + +
	// AUFTRAEGE
+ +234 + + + + + + +
	// =====================================================================
+ +235 + + + + + + +
+ +236 + + + + + + +
	public List<Auftrag> getAuftraege(String status) {
+ +237 + + + + + + +
		String sql = "SELECT a.*, k.nachname, k.vorname, f.kennzeichen, f.marke, f.modell "
+ +238 + + + + + + +
				+ "FROM auftrag a LEFT JOIN kunde k ON k.id = a.kunde_id LEFT JOIN fahrzeug f ON f.id = a.fahrzeug_id";
+ +239 + + +3 + +1. getAuftraege : changed conditional boundary → SURVIVED
+2. getAuftraege : negated conditional → KILLED
+3. getAuftraege : negated conditional → KILLED
+ +
+
+
		if (status != null && status.length() > 0) {
+ +240 + + + + + + +
			// Status kommt nur aus dem eigenen Frontend, passt schon
+ +241 + + + + + + +
			sql = sql + " WHERE a.status = '" + status + "'";
+ +242 + + + + + + +
		}
+ +243 + + + + + + +
		sql = sql + " ORDER BY a.angenommen_am DESC";
+ +244 + + +1 + +1. getAuftraege : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAuftraege → KILLED
+ +
+
+
		return jdbcTemplate.query(sql, new RowMapper<Auftrag>() {
+ +245 + + + + + + +
			public Auftrag mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +246 + + + + + + +
				Auftrag a = mapAuftrag(rs);
+ +247 + + + + + + +
				String nn = rs.getString("nachname");
+ +248 + + + + + + +
				if (nn != null) {
+ +249 + + + + + + +
					a.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +250 + + + + + + +
				}
+ +251 + + + + + + +
				a.setKennzeichen(rs.getString("kennzeichen"));
+ +252 + + + + + + +
				a.setFahrzeugBezeichnung(defaultString(rs.getString("marke")) + " " + defaultString(rs.getString("modell")));
+ +253 + + + + + + +
				return a;
+ +254 + + + + + + +
			}
+ +255 + + + + + + +
		});
+ +256 + + + + + + +
	}
+ +257 + + + + + + +
+ +258 + + + + + + +
	public Auftrag getAuftrag(long id) {
+ +259 + + + + + + +
		String sql = "SELECT a.*, k.nachname, k.vorname, f.kennzeichen, f.marke, f.modell "
+ +260 + + + + + + +
				+ "FROM auftrag a LEFT JOIN kunde k ON k.id = a.kunde_id LEFT JOIN fahrzeug f ON f.id = a.fahrzeug_id "
+ +261 + + + + + + +
				+ "WHERE a.id = " + id;
+ +262 + + + + + + +
		List<Auftrag> liste = jdbcTemplate.query(sql, new RowMapper<Auftrag>() {
+ +263 + + + + + + +
			public Auftrag mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +264 + + + + + + +
				Auftrag a = mapAuftrag(rs);
+ +265 + + + + + + +
				String nn = rs.getString("nachname");
+ +266 + + + + + + +
				if (nn != null) {
+ +267 + + + + + + +
					a.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +268 + + + + + + +
				}
+ +269 + + + + + + +
				a.setKennzeichen(rs.getString("kennzeichen"));
+ +270 + + + + + + +
				a.setFahrzeugBezeichnung(defaultString(rs.getString("marke")) + " " + defaultString(rs.getString("modell")));
+ +271 + + + + + + +
				return a;
+ +272 + + + + + + +
			}
+ +273 + + + + + + +
		});
+ +274 + + +1 + +1. getAuftrag : negated conditional → KILLED
+ +
+
+
		if (liste.isEmpty()) {
+ +275 + + + + + + +
			return null;
+ +276 + + + + + + +
		}
+ +277 + + + + + + +
		Auftrag auftrag = liste.get(0);
+ +278 + + +1 + +1. getAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setPositionen → KILLED
+ +
+
+
		auftrag.setPositionen(getPositionen(id));
+ +279 + + +1 + +1. getAuftrag : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getAuftrag → KILLED
+ +
+
+
		return auftrag;
+ +280 + + + + + + +
	}
+ +281 + + + + + + +
+ +282 + + + + + + +
	private Auftrag mapAuftrag(ResultSet rs) throws SQLException {
+ +283 + + + + + + +
		Auftrag a = new Auftrag();
+ +284 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setId → NO_COVERAGE
+ +
+
+
		a.setId(rs.getLong("id"));
+ +285 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → NO_COVERAGE
+ +
+
+
		a.setAuftragNr(rs.getString("auftrag_nr"));
+ +286 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setFahrzeugId → NO_COVERAGE
+ +
+
+
		a.setFahrzeugId(rs.getLong("fahrzeug_id"));
+ +287 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setKundeId → NO_COVERAGE
+ +
+
+
		a.setKundeId(rs.getLong("kunde_id"));
+ +288 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setStatus → NO_COVERAGE
+ +
+
+
		a.setStatus(rs.getString("status"));
+ +289 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setBeschreibung → NO_COVERAGE
+ +
+
+
		a.setBeschreibung(rs.getString("beschreibung"));
+ +290 + + + + + + +
		int km = rs.getInt("km_stand");
+ +291 + + +1 + +1. mapAuftrag : negated conditional → NO_COVERAGE
+ +
+
+
		if (!rs.wasNull()) {
+ +292 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setKmStand → NO_COVERAGE
+ +
+
+
			a.setKmStand(km);
+ +293 + + + + + + +
		}
+ +294 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAngenommenAm → NO_COVERAGE
+ +
+
+
		a.setAngenommenAm(rs.getTimestamp("angenommen_am"));
+ +295 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setFertigAm → NO_COVERAGE
+ +
+
+
		a.setFertigAm(rs.getTimestamp("fertig_am"));
+ +296 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAbgeholtAm → NO_COVERAGE
+ +
+
+
		a.setAbgeholtAm(rs.getTimestamp("abgeholt_am"));
+ +297 + + +1 + +1. mapAuftrag : replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapAuftrag → NO_COVERAGE
+ +
+
+
		return a;
+ +298 + + + + + + +
	}
+ +299 + + + + + + +
+ +300 + + + + + + +
	public List<AuftragPosition> getPositionen(long auftragId) {
+ +301 + + +1 + +1. getPositionen : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getPositionen → KILLED
+ +
+
+
		return jdbcTemplate.query("SELECT * FROM auftrag_position WHERE auftrag_id = " + auftragId + " ORDER BY id",
+ +302 + + + + + + +
				new RowMapper<AuftragPosition>() {
+ +303 + + + + + + +
					public AuftragPosition mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +304 + + + + + + +
						AuftragPosition p = new AuftragPosition();
+ +305 + + + + + + +
						p.setId(rs.getLong("id"));
+ +306 + + + + + + +
						p.setAuftragId(rs.getLong("auftrag_id"));
+ +307 + + + + + + +
						p.setTyp(rs.getString("typ"));
+ +308 + + + + + + +
						p.setBezeichnung(rs.getString("bezeichnung"));
+ +309 + + + + + + +
						p.setMenge(rs.getDouble("menge"));
+ +310 + + + + + + +
						p.setEinzelpreis(rs.getDouble("einzelpreis"));
+ +311 + + + + + + +
						return p;
+ +312 + + + + + + +
					}
+ +313 + + + + + + +
				});
+ +314 + + + + + + +
	}
+ +315 + + + + + + +
+ +316 + + + + + + +
	/**
+ +317 + + + + + + +
	 * Neuen Auftrag anlegen. Nummer wird aus MAX+1 gebaut - bei zwei
+ +318 + + + + + + +
	 * gleichzeitigen Annahmen knallt es theoretisch, ist aber bei uns noch nie
+ +319 + + + + + + +
	 * passiert (eine Annahme-Theke).
+ +320 + + + + + + +
	 */
+ +321 + + + + + + +
	public Auftrag neuerAuftrag(Auftrag auftrag) {
+ +322 + + + + + + +
		int jahr = Calendar.getInstance().get(Calendar.YEAR);
+ +323 + + + + + + +
		Integer max = jdbcTemplate.queryForObject(
+ +324 + + + + + + +
				"SELECT COALESCE(MAX(CAST(SUBSTRING(auftrag_nr FROM 8) AS INTEGER)), 0) FROM auftrag WHERE auftrag_nr LIKE 'A-" + jahr + "-%'",
+ +325 + + + + + + +
				Integer.class);
+ +326 + + +1 + +1. neuerAuftrag : Replaced integer addition with subtraction → KILLED
+ +
+
+
		String nr = "A-" + jahr + "-" + String.format("%04d", max + 1);
+ +327 + + +1 + +1. neuerAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → KILLED
+ +
+
+
		auftrag.setAuftragNr(nr);
+ +328 + + +1 + +1. neuerAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setStatus → KILLED
+ +
+
+
		auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN);
+ +329 + + + + + + +
+ +330 + + + + + + +
		Long neueId = jdbcTemplate.queryForObject(
+ +331 + + + + + + +
				"INSERT INTO auftrag (auftrag_nr, fahrzeug_id, kunde_id, status, beschreibung, km_stand, angenommen_am) "
+ +332 + + + + + + +
						+ "VALUES (?, ?, ?, ?, ?, ?, now()) RETURNING id",
+ +333 + + + + + + +
				Long.class, nr, auftrag.getFahrzeugId(), auftrag.getKundeId(), auftrag.getStatus(),
+ +334 + + + + + + +
				auftrag.getBeschreibung(), auftrag.getKmStand());
+ +335 + + +1 + +1. neuerAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setId → KILLED
+ +
+
+
		auftrag.setId(neueId);
+ +336 + + + + + + +
+ +337 + + + + + + +
		// km-Stand gleich am Fahrzeug mitziehen (ohne Transaktion, siehe Notizen)
+ +338 + + +1 + +1. neuerAuftrag : negated conditional → SURVIVED
+ +
+
+
		if (auftrag.getKmStand() != null) {
+ +339 + + + + + + +
			jdbcTemplate.update("UPDATE fahrzeug SET km_stand = " + auftrag.getKmStand() + " WHERE id = "
+ +340 + + + + + + +
					+ auftrag.getFahrzeugId());
+ +341 + + + + + + +
		}
+ +342 + + + + + + +
+ +343 + + + + + + +
		LOG.info("Auftrag " + nr + " angelegt fuer Fahrzeug " + auftrag.getFahrzeugId());
+ +344 + + +1 + +1. neuerAuftrag : replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuerAuftrag → KILLED
+ +
+
+
		return getAuftrag(neueId);
+ +345 + + + + + + +
	}
+ +346 + + + + + + +
+ +347 + + + + + + +
	/**
+ +348 + + + + + + +
	 * Statuswechsel mit den erlaubten Uebergaengen. Die Regeln stehen so auch
+ +349 + + + + + + +
	 * im Werkstatt-Ordner bei der Annahme-Theke.
+ +350 + + + + + + +
	 */
+ +351 + + + + + + +
	public Auftrag setzeStatus(long auftragId, String neuerStatus) {
+ +352 + + + + + + +
		Auftrag auftrag = getAuftrag(auftragId);
+ +353 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
		if (auftrag == null) {
+ +354 + + + + + + +
			throw new RuntimeException("Auftrag " + auftragId + " nicht gefunden");
+ +355 + + + + + + +
		}
+ +356 + + + + + + +
		String alt = auftrag.getStatus();
+ +357 + + + + + + +
+ +358 + + + + + + +
		boolean erlaubt = false;
+ +359 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
		if (alt.equals(Auftrag.STATUS_ANGENOMMEN)) {
+ +360 + + +2 + +1. setzeStatus : negated conditional → KILLED
+2. setzeStatus : negated conditional → KILLED
+ +
+
+
			if (neuerStatus.equals(Auftrag.STATUS_IN_ARBEIT) || neuerStatus.equals(Auftrag.STATUS_STORNIERT)) {
+ +361 + + + + + + +
				erlaubt = true;
+ +362 + + + + + + +
			}
+ +363 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
		} else if (alt.equals(Auftrag.STATUS_IN_ARBEIT)) {
+ +364 + + +2 + +1. setzeStatus : negated conditional → NO_COVERAGE
+2. setzeStatus : negated conditional → KILLED
+ +
+
+
			if (neuerStatus.equals(Auftrag.STATUS_FERTIG) || neuerStatus.equals(Auftrag.STATUS_STORNIERT)) {
+ +365 + + + + + + +
				erlaubt = true;
+ +366 + + + + + + +
			}
+ +367 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
		} else if (alt.equals(Auftrag.STATUS_FERTIG)) {
+ +368 + + +1 + +1. setzeStatus : negated conditional → SURVIVED
+ +
+
+
			if (neuerStatus.equals(Auftrag.STATUS_ABGEHOLT)) {
+ +369 + + + + + + +
				erlaubt = true;
+ +370 + + + + + + +
			}
+ +371 + + + + + + +
			// Sonderfall: doch noch was gefunden -> zurueck in Arbeit
+ +372 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
			if (neuerStatus.equals(Auftrag.STATUS_IN_ARBEIT)) {
+ +373 + + + + + + +
				erlaubt = true;
+ +374 + + + + + + +
			}
+ +375 + + + + + + +
		}
+ +376 + + + + + + +
+ +377 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
		if (!erlaubt) {
+ +378 + + + + + + +
			throw new RuntimeException("Statuswechsel " + alt + " -> " + neuerStatus + " ist nicht erlaubt");
+ +379 + + + + + + +
		}
+ +380 + + + + + + +
+ +381 + + + + + + +
		String sql = "UPDATE auftrag SET status = '" + neuerStatus + "'";
+ +382 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
		if (neuerStatus.equals(Auftrag.STATUS_FERTIG)) {
+ +383 + + + + + + +
			sql = sql + ", fertig_am = now()";
+ +384 + + + + + + +
		}
+ +385 + + +1 + +1. setzeStatus : negated conditional → SURVIVED
+ +
+
+
		if (neuerStatus.equals(Auftrag.STATUS_ABGEHOLT)) {
+ +386 + + + + + + +
			sql = sql + ", abgeholt_am = now()";
+ +387 + + + + + + +
		}
+ +388 + + + + + + +
		sql = sql + " WHERE id = " + auftragId;
+ +389 + + + + + + +
		jdbcTemplate.update(sql);
+ +390 + + + + + + +
+ +391 + + + + + + +
		LOG.info("Auftrag " + auftrag.getAuftragNr() + ": " + alt + " -> " + neuerStatus);
+ +392 + + +1 + +1. setzeStatus : replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeStatus → SURVIVED
+ +
+
+
		return getAuftrag(auftragId);
+ +393 + + + + + + +
	}
+ +394 + + + + + + +
+ +395 + + + + + + +
	public AuftragPosition neuePosition(long auftragId, AuftragPosition position) {
+ +396 + + + + + + +
		Auftrag auftrag = getAuftrag(auftragId);
+ +397 + + +1 + +1. neuePosition : negated conditional → KILLED
+ +
+
+
		if (auftrag == null) {
+ +398 + + + + + + +
			throw new RuntimeException("Auftrag " + auftragId + " nicht gefunden");
+ +399 + + + + + + +
		}
+ +400 + + +2 + +1. neuePosition : negated conditional → KILLED
+2. neuePosition : negated conditional → KILLED
+ +
+
+
		if (auftrag.getStatus().equals(Auftrag.STATUS_ABGEHOLT) || auftrag.getStatus().equals(Auftrag.STATUS_STORNIERT)) {
+ +401 + + + + + + +
			throw new RuntimeException("Auftrag " + auftrag.getAuftragNr() + " ist abgeschlossen, keine Positionen mehr moeglich");
+ +402 + + + + + + +
		}
+ +403 + + + + + + +
		Long neueId = jdbcTemplate.queryForObject(
+ +404 + + + + + + +
				"INSERT INTO auftrag_position (auftrag_id, typ, bezeichnung, menge, einzelpreis) VALUES (?, ?, ?, ?, ?) RETURNING id",
+ +405 + + + + + + +
				Long.class, auftragId, position.getTyp(), position.getBezeichnung(), position.getMenge(),
+ +406 + + + + + + +
				position.getEinzelpreis());
+ +407 + + +1 + +1. neuePosition : removed call to at/werkstatt/crm/model/AuftragPosition::setId → KILLED
+ +
+
+
		position.setId(neueId);
+ +408 + + +1 + +1. neuePosition : removed call to at/werkstatt/crm/model/AuftragPosition::setAuftragId → KILLED
+ +
+
+
		position.setAuftragId(auftragId);
+ +409 + + +1 + +1. neuePosition : replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuePosition → KILLED
+ +
+
+
		return position;
+ +410 + + + + + + +
	}
+ +411 + + + + + + +
+ +412 + + + + + + +
	public void loeschePosition(long positionId) {
+ +413 + + + + + + +
		jdbcTemplate.update("DELETE FROM auftrag_position WHERE id = " + positionId);
+ +414 + + + + + + +
	}
+ +415 + + + + + + +
+ +416 + + + + + + +
	// =====================================================================
+ +417 + + + + + + +
	// RECHNUNGEN
+ +418 + + + + + + +
	// =====================================================================
+ +419 + + + + + + +
+ +420 + + + + + + +
	public List<Rechnung> getAlleRechnungen() {
+ +421 + + + + + + +
		String sql = "SELECT r.*, a.auftrag_nr, k.nachname, k.vorname FROM rechnung r "
+ +422 + + + + + + +
				+ "LEFT JOIN auftrag a ON a.id = r.auftrag_id LEFT JOIN kunde k ON k.id = a.kunde_id "
+ +423 + + + + + + +
				+ "ORDER BY r.ausgestellt_am DESC, r.id DESC";
+ +424 + + +1 + +1. getAlleRechnungen : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleRechnungen → NO_COVERAGE
+ +
+
+
		return jdbcTemplate.query(sql, new RowMapper<Rechnung>() {
+ +425 + + + + + + +
			public Rechnung mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +426 + + + + + + +
				Rechnung r = mapRechnung(rs);
+ +427 + + + + + + +
				r.setAuftragNr(rs.getString("auftrag_nr"));
+ +428 + + + + + + +
				String nn = rs.getString("nachname");
+ +429 + + + + + + +
				if (nn != null) {
+ +430 + + + + + + +
					r.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +431 + + + + + + +
				}
+ +432 + + + + + + +
				return r;
+ +433 + + + + + + +
			}
+ +434 + + + + + + +
		});
+ +435 + + + + + + +
	}
+ +436 + + + + + + +
+ +437 + + + + + + +
	public Rechnung getRechnung(long id) {
+ +438 + + + + + + +
		String sql = "SELECT r.*, a.auftrag_nr, k.nachname, k.vorname FROM rechnung r "
+ +439 + + + + + + +
				+ "LEFT JOIN auftrag a ON a.id = r.auftrag_id LEFT JOIN kunde k ON k.id = a.kunde_id WHERE r.id = " + id;
+ +440 + + + + + + +
		List<Rechnung> liste = jdbcTemplate.query(sql, new RowMapper<Rechnung>() {
+ +441 + + + + + + +
			public Rechnung mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +442 + + + + + + +
				Rechnung r = mapRechnung(rs);
+ +443 + + + + + + +
				r.setAuftragNr(rs.getString("auftrag_nr"));
+ +444 + + + + + + +
				String nn = rs.getString("nachname");
+ +445 + + + + + + +
				if (nn != null) {
+ +446 + + + + + + +
					r.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +447 + + + + + + +
				}
+ +448 + + + + + + +
				return r;
+ +449 + + + + + + +
			}
+ +450 + + + + + + +
		});
+ +451 + + +2 + +1. getRechnung : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getRechnung → SURVIVED
+2. getRechnung : negated conditional → KILLED
+ +
+
+
		return liste.isEmpty() ? null : liste.get(0);
+ +452 + + + + + + +
	}
+ +453 + + + + + + +
+ +454 + + + + + + +
	private Rechnung mapRechnung(ResultSet rs) throws SQLException {
+ +455 + + + + + + +
		Rechnung r = new Rechnung();
+ +456 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setId → NO_COVERAGE
+ +
+
+
		r.setId(rs.getLong("id"));
+ +457 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setRechnungNr → NO_COVERAGE
+ +
+
+
		r.setRechnungNr(rs.getString("rechnung_nr"));
+ +458 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setAuftragId → NO_COVERAGE
+ +
+
+
		r.setAuftragId(rs.getLong("auftrag_id"));
+ +459 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setAusgestelltAm → NO_COVERAGE
+ +
+
+
		r.setAusgestelltAm(rs.getTimestamp("ausgestellt_am"));
+ +460 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setSummeNetto → NO_COVERAGE
+ +
+
+
		r.setSummeNetto(rs.getDouble("summe_netto"));
+ +461 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setUst → NO_COVERAGE
+ +
+
+
		r.setUst(rs.getDouble("ust"));
+ +462 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setSummeBrutto → NO_COVERAGE
+ +
+
+
		r.setSummeBrutto(rs.getDouble("summe_brutto"));
+ +463 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setBezahlt → NO_COVERAGE
+ +
+
+
		r.setBezahlt(rs.getBoolean("bezahlt"));
+ +464 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setBezahltAm → NO_COVERAGE
+ +
+
+
		r.setBezahltAm(rs.getTimestamp("bezahlt_am"));
+ +465 + + +1 + +1. mapRechnung : replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapRechnung → NO_COVERAGE
+ +
+
+
		return r;
+ +466 + + + + + + +
	}
+ +467 + + + + + + +
+ +468 + + + + + + +
	/**
+ +469 + + + + + + +
	 * Rechnung zu einem fertigen Auftrag erstellen. Rundung auf 2 Stellen
+ +470 + + + + + + +
	 * passiert hier haendisch - double reicht fuer unsere Betraege.
+ +471 + + + + + + +
	 */
+ +472 + + + + + + +
	public Rechnung erstelleRechnung(long auftragId) {
+ +473 + + + + + + +
		Auftrag auftrag = getAuftrag(auftragId);
+ +474 + + +1 + +1. erstelleRechnung : negated conditional → KILLED
+ +
+
+
		if (auftrag == null) {
+ +475 + + + + + + +
			throw new RuntimeException("Auftrag " + auftragId + " nicht gefunden");
+ +476 + + + + + + +
		}
+ +477 + + +1 + +1. erstelleRechnung : negated conditional → KILLED
+ +
+
+
		if (!auftrag.getStatus().equals(Auftrag.STATUS_FERTIG)) {
+ +478 + + + + + + +
			throw new RuntimeException(
+ +479 + + + + + + +
					"Rechnung geht nur bei Status FERTIG, Auftrag " + auftrag.getAuftragNr() + " ist " + auftrag.getStatus());
+ +480 + + + + + + +
		}
+ +481 + + + + + + +
		Integer vorhanden = jdbcTemplate.queryForObject(
+ +482 + + + + + + +
				"SELECT COUNT(*) FROM rechnung WHERE auftrag_id = " + auftragId, Integer.class);
+ +483 + + +3 + +1. erstelleRechnung : changed conditional boundary → KILLED
+2. erstelleRechnung : negated conditional → KILLED
+3. erstelleRechnung : negated conditional → KILLED
+ +
+
+
		if (vorhanden != null && vorhanden > 0) {
+ +484 + + + + + + +
			throw new RuntimeException("Zum Auftrag " + auftrag.getAuftragNr() + " gibt es schon eine Rechnung");
+ +485 + + + + + + +
		}
+ +486 + + + + + + +
+ +487 + + + + + + +
		double netto = 0;
+ +488 + + + + + + +
		for (AuftragPosition p : auftrag.getPositionen()) {
+ +489 + + +2 + +1. erstelleRechnung : Replaced double multiplication with division → KILLED
+2. erstelleRechnung : Replaced double addition with subtraction → KILLED
+ +
+
+
			netto = netto + p.getMenge() * p.getEinzelpreis();
+ +490 + + + + + + +
		}
+ +491 + + +2 + +1. erstelleRechnung : Replaced double multiplication with division → KILLED
+2. erstelleRechnung : Replaced double division with multiplication → KILLED
+ +
+
+
		netto = Math.round(netto * 100.0) / 100.0;
+ +492 + + +2 + +1. erstelleRechnung : Replaced double division with multiplication → KILLED
+2. erstelleRechnung : Replaced double multiplication with division → KILLED
+ +
+
+
		double ust = Math.round(netto * ustSatz) / 100.0;
+ +493 + + +3 + +1. erstelleRechnung : Replaced double multiplication with division → KILLED
+2. erstelleRechnung : Replaced double division with multiplication → KILLED
+3. erstelleRechnung : Replaced double addition with subtraction → KILLED
+ +
+
+
		double brutto = Math.round((netto + ust) * 100.0) / 100.0;
+ +494 + + + + + + +
+ +495 + + + + + + +
		int jahr = Calendar.getInstance().get(Calendar.YEAR);
+ +496 + + + + + + +
		Integer max = jdbcTemplate.queryForObject(
+ +497 + + + + + + +
				"SELECT COALESCE(MAX(CAST(SUBSTRING(rechnung_nr FROM 8) AS INTEGER)), 0) FROM rechnung WHERE rechnung_nr LIKE 'R-" + jahr + "-%'",
+ +498 + + + + + + +
				Integer.class);
+ +499 + + +1 + +1. erstelleRechnung : Replaced integer addition with subtraction → KILLED
+ +
+
+
		String nr = "R-" + jahr + "-" + String.format("%04d", max + 1);
+ +500 + + + + + + +
+ +501 + + + + + + +
		Long neueId = jdbcTemplate.queryForObject(
+ +502 + + + + + + +
				"INSERT INTO rechnung (rechnung_nr, auftrag_id, ausgestellt_am, summe_netto, ust, summe_brutto, bezahlt) "
+ +503 + + + + + + +
						+ "VALUES (?, ?, now(), ?, ?, ?, false) RETURNING id",
+ +504 + + + + + + +
				Long.class, nr, auftragId, netto, ust, brutto);
+ +505 + + + + + + +
+ +506 + + +1 + +1. erstelleRechnung : removed call to java/io/PrintStream::println → SURVIVED
+ +
+
+
		System.out.println("Rechnung " + nr + " erstellt, brutto " + brutto);
+ +507 + + +1 + +1. erstelleRechnung : replaced return value with null for at/werkstatt/crm/service/WerkstattService::erstelleRechnung → SURVIVED
+ +
+
+
		return getRechnung(neueId);
+ +508 + + + + + + +
	}
+ +509 + + + + + + +
+ +510 + + + + + + +
	public Rechnung setzeBezahlt(long rechnungId) {
+ +511 + + + + + + +
		jdbcTemplate.update("UPDATE rechnung SET bezahlt = true, bezahlt_am = now() WHERE id = " + rechnungId);
+ +512 + + +1 + +1. setzeBezahlt : replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeBezahlt → SURVIVED
+ +
+
+
		return getRechnung(rechnungId);
+ +513 + + + + + + +
	}
+ +514 + + + + + + +
+ +515 + + + + + + +
	// =====================================================================
+ +516 + + + + + + +
	// BERICHT
+ +517 + + + + + + +
	// =====================================================================
+ +518 + + + + + + +
+ +519 + + + + + + +
	public List<MonatsBericht> getMonatsBericht(int jahr) {
+ +520 + + + + + + +
		// Auftraege und Rechnungen je Monat; Umsatz nur aus Rechnungen
+ +521 + + + + + + +
		String sql = "SELECT m.monat, "
+ +522 + + + + + + +
				+ " (SELECT COUNT(*) FROM auftrag a WHERE EXTRACT(YEAR FROM a.angenommen_am) = " + jahr
+ +523 + + + + + + +
				+ "   AND EXTRACT(MONTH FROM a.angenommen_am) = m.monat) AS anzahl_auftraege, "
+ +524 + + + + + + +
				+ " (SELECT COUNT(*) FROM rechnung r WHERE EXTRACT(YEAR FROM r.ausgestellt_am) = " + jahr
+ +525 + + + + + + +
				+ "   AND EXTRACT(MONTH FROM r.ausgestellt_am) = m.monat) AS anzahl_rechnungen, "
+ +526 + + + + + + +
				+ " (SELECT COALESCE(SUM(r.summe_netto),0) FROM rechnung r WHERE EXTRACT(YEAR FROM r.ausgestellt_am) = " + jahr
+ +527 + + + + + + +
				+ "   AND EXTRACT(MONTH FROM r.ausgestellt_am) = m.monat) AS umsatz_netto, "
+ +528 + + + + + + +
				+ " (SELECT COALESCE(SUM(r.summe_brutto),0) FROM rechnung r WHERE EXTRACT(YEAR FROM r.ausgestellt_am) = " + jahr
+ +529 + + + + + + +
				+ "   AND EXTRACT(MONTH FROM r.ausgestellt_am) = m.monat) AS umsatz_brutto "
+ +530 + + + + + + +
				+ "FROM generate_series(1,12) AS m(monat) ORDER BY m.monat";
+ +531 + + + + + + +
		final int j = jahr;
+ +532 + + +1 + +1. getMonatsBericht : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getMonatsBericht → KILLED
+ +
+
+
		return jdbcTemplate.query(sql, new RowMapper<MonatsBericht>() {
+ +533 + + + + + + +
			public MonatsBericht mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +534 + + + + + + +
				MonatsBericht b = new MonatsBericht();
+ +535 + + + + + + +
				b.setJahr(j);
+ +536 + + + + + + +
				b.setMonat(rs.getInt("monat"));
+ +537 + + + + + + +
				b.setAnzahlAuftraege(rs.getInt("anzahl_auftraege"));
+ +538 + + + + + + +
				b.setAnzahlRechnungen(rs.getInt("anzahl_rechnungen"));
+ +539 + + + + + + +
				b.setUmsatzNetto(rs.getDouble("umsatz_netto"));
+ +540 + + + + + + +
				b.setUmsatzBrutto(rs.getDouble("umsatz_brutto"));
+ +541 + + + + + + +
				return b;
+ +542 + + + + + + +
			}
+ +543 + + + + + + +
		});
+ +544 + + + + + + +
	}
+ +545 + + + + + + +
+ +546 + + + + + + +
	public List<Map<String, Object>> getTopKunden(int jahr) {
+ +547 + + + + + + +
		String sql = "SELECT k.id, k.nachname, k.vorname, COUNT(DISTINCT a.id) AS anzahl_auftraege, "
+ +548 + + + + + + +
				+ "COALESCE(SUM(r.summe_brutto),0) AS umsatz "
+ +549 + + + + + + +
				+ "FROM kunde k JOIN auftrag a ON a.kunde_id = k.id "
+ +550 + + + + + + +
				+ "LEFT JOIN rechnung r ON r.auftrag_id = a.id AND EXTRACT(YEAR FROM r.ausgestellt_am) = " + jahr + " "
+ +551 + + + + + + +
				+ "WHERE EXTRACT(YEAR FROM a.angenommen_am) = " + jahr + " "
+ +552 + + + + + + +
				+ "GROUP BY k.id, k.nachname, k.vorname ORDER BY umsatz DESC, anzahl_auftraege DESC LIMIT 10";
+ +553 + + +1 + +1. getTopKunden : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getTopKunden → KILLED
+ +
+
+
		return jdbcTemplate.queryForList(sql);
+ +554 + + + + + + +
	}
+ +555 + + + + + + +
+ +556 + + + + + + +
	// =====================================================================
+ +557 + + + + + + +
	// ADMIN / STATISTIK (fuer die JSP-Seite)
+ +558 + + + + + + +
	// =====================================================================
+ +559 + + + + + + +
+ +560 + + + + + + +
	public Map<String, Object> getAdminStatistik() {
+ +561 + + + + + + +
		Map<String, Object> statistik = new HashMap<String, Object>();
+ +562 + + + + + + +
		statistik.put("kunden", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM kunde", Integer.class));
+ +563 + + + + + + +
		statistik.put("fahrzeuge", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM fahrzeug", Integer.class));
+ +564 + + + + + + +
		statistik.put("auftraege", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM auftrag", Integer.class));
+ +565 + + + + + + +
		statistik.put("auftraegeOffen", jdbcTemplate.queryForObject(
+ +566 + + + + + + +
				"SELECT COUNT(*) FROM auftrag WHERE status IN ('ANGENOMMEN','IN_ARBEIT')", Integer.class));
+ +567 + + + + + + +
		statistik.put("rechnungen", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM rechnung", Integer.class));
+ +568 + + + + + + +
		statistik.put("rechnungenOffen",
+ +569 + + + + + + +
				jdbcTemplate.queryForObject("SELECT COUNT(*) FROM rechnung WHERE bezahlt = false", Integer.class));
+ +570 + + + + + + +
		statistik.put("stand", DATUM.format(new Date()));
+ +571 + + +1 + +1. getAdminStatistik : replaced return value with Collections.emptyMap for at/werkstatt/crm/service/WerkstattService::getAdminStatistik → KILLED
+ +
+
+
		return statistik;
+ +572 + + + + + + +
	}
+ +573 + + + + + + +
+ +574 + + + + + + +
	/**
+ +575 + + + + + + +
	 * Raeumt stornierte Auftraege aelter als 90 Tage weg. Wird vom Chef
+ +576 + + + + + + +
	 * einmal im Jahr aufgerufen. Loescht wirklich!
+ +577 + + + + + + +
	 */
+ +578 + + + + + + +
	public int bereinigeStornierte() {
+ +579 + + + + + + +
		List<Long> ids = jdbcTemplate.queryForList(
+ +580 + + + + + + +
				"SELECT id FROM auftrag WHERE status = 'STORNIERT' AND angenommen_am < now() - interval '90 days'",
+ +581 + + + + + + +
				Long.class);
+ +582 + + + + + + +
		for (Long id : ids) {
+ +583 + + + + + + +
			jdbcTemplate.update("DELETE FROM auftrag_position WHERE auftrag_id = " + id);
+ +584 + + + + + + +
			jdbcTemplate.update("DELETE FROM auftrag WHERE id = " + id);
+ +585 + + + + + + +
		}
+ +586 + + + + + + +
		LOG.warn("Bereinigung: " + ids.size() + " stornierte Auftraege geloescht");
+ +587 + + +1 + +1. bereinigeStornierte : replaced int return with 0 for at/werkstatt/crm/service/WerkstattService::bereinigeStornierte → KILLED
+ +
+
+
		return ids.size();
+ +588 + + + + + + +
	}
+ +589 + + + + + + +
+ +590 + + + + + + +
	// =====================================================================
+ +591 + + + + + + +
	// Hilfsmethoden
+ +592 + + + + + + +
	// =====================================================================
+ +593 + + + + + + +
+ +594 + + + + + + +
	private String defaultString(String s) {
+ +595 + + +1 + +1. defaultString : negated conditional → NO_COVERAGE
+ +
+
+
		if (s == null) {
+ +596 + + + + + + +
			return "";
+ +597 + + + + + + +
		}
+ +598 + + +1 + +1. defaultString : replaced return value with "" for at/werkstatt/crm/service/WerkstattService::defaultString → NO_COVERAGE
+ +
+
+
		return s;
+ +599 + + + + + + +
	}
+ +600 + + + + + + +
+ +601 + + + + + + +
	// Alte Version der Suche, war zu langsam, bleibt als Referenz da
+ +602 + + + + + + +
	// public List<Kunde> sucheKundenAlt(String begriff) {
+ +603 + + + + + + +
	//     List<Kunde> alle = getAlleKunden();
+ +604 + + + + + + +
	//     List<Kunde> treffer = new ArrayList<Kunde>();
+ +605 + + + + + + +
	//     for (Kunde k : alle) {
+ +606 + + + + + + +
	//         if (k.getNachname() != null && k.getNachname().toLowerCase().contains(begriff.toLowerCase())) {
+ +607 + + + + + + +
	//             treffer.add(k);
+ +608 + + + + + + +
	//         }
+ +609 + + + + + + +
	//     }
+ +610 + + + + + + +
	//     return treffer;
+ +611 + + + + + + +
	// }
+ +612 + + + + + + +
+ +613 + + + + + + +
}

Mutations

53 + + + +

1.1
Location : getAlleKunden
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleKunden_returnsAllKunden()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleKunden → KILLED + +

82 + + + +

1.1
Location : sucheKunden
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_includesAllFields()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::sucheKunden → KILLED + +

120 + + + +

1.1
Location : getKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_returnsNullIfNotFound()]
negated conditional → KILLED + +

123 + + + +

1.1
Location : getKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_returnsKundeIfExists()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getKunde → KILLED + +

127 + + + +

1.1
Location : speichereKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_updatesExistingKunde()]
negated conditional → KILLED + +

133 + + + +

1.1
Location : speichereKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_insertsNewKunde()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

141 + + + +

1.1
Location : speichereKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_updatesExistingKunde()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereKunde → KILLED + +

146 + + + +

1.1
Location : loescheKunde
Killed by : none
removed call to java/io/PrintStream::println → SURVIVED +
Covering tests +

+
156 + + + +

1.1
Location : getAlleFahrzeuge
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleFahrzeuge_returnsAllFahrzeugeWithKundeName()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleFahrzeuge → KILLED + +

170 + + + +

1.1
Location : getFahrzeugeZuKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeugeZuKunde_returnsFahrzeugeForKunde()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getFahrzeugeZuKunde → KILLED + +

184 + + + +

1.1
Location : getFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_returnsFahrzeugIfExists()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getFahrzeug → KILLED +

2.2
Location : getFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_returnsNullIfNotFound()]
negated conditional → KILLED + +

190 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setId → SURVIVED +
Covering tests +

+
191 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setKundeId → SURVIVED +
Covering tests +

+
192 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setKennzeichen → SURVIVED +
Covering tests +

+
193 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setMarke → SURVIVED +
Covering tests +

+
194 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setModell → SURVIVED +
Covering tests +

+
195 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setFahrgestellnr → SURVIVED +
Covering tests +

+
197 + + + +

1.1
Location : mapFahrzeug
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
198 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setBaujahr → SURVIVED +
Covering tests +

+
201 + + + +

1.1
Location : mapFahrzeug
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
202 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setKmStand → SURVIVED +
Covering tests +

+
204 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setPickerlDatum → SURVIVED +
Covering tests +

+
205 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setAngelegtAm → SURVIVED +
Covering tests +

+
206 + + + +

1.1
Location : mapFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleFahrzeuge_returnsAllFahrzeugeWithKundeName()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapFahrzeug → KILLED + +

210 + + + +

1.1
Location : speichereFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_updatesExistingFahrzeug()]
negated conditional → KILLED + +

217 + + + +

1.1
Location : speichereFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insertsNewFahrzeug()]
removed call to at/werkstatt/crm/model/Fahrzeug::setId → KILLED + +

225 + + + +

1.1
Location : speichereFahrzeug
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereFahrzeug → SURVIVED +
Covering tests +

+
239 + + + +

1.1
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_filtersByStatus()]
negated conditional → KILLED +

2.2
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_returnsAllAuftraege()]
negated conditional → KILLED +

3.3
Location : getAuftraege
Killed by : none
changed conditional boundary → SURVIVED +
Covering tests +

+
244 + + + +

1.1
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_returnsAllAuftraege()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAuftraege → KILLED + +

274 + + + +

1.1
Location : getAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsNullIfNotFound()]
negated conditional → KILLED + +

278 + + + +

1.1
Location : getAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsAuftragWithPositionen()]
removed call to at/werkstatt/crm/model/Auftrag::setPositionen → KILLED + +

279 + + + +

1.1
Location : getAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragIsAbgeschlossen()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getAuftrag → KILLED + +

284 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setId → NO_COVERAGE + +

285 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → NO_COVERAGE + +

286 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setFahrzeugId → NO_COVERAGE + +

287 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setKundeId → NO_COVERAGE + +

288 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setStatus → NO_COVERAGE + +

289 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setBeschreibung → NO_COVERAGE + +

291 + + + +

1.1
Location : mapAuftrag
Killed by : none
negated conditional → NO_COVERAGE + +

292 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setKmStand → NO_COVERAGE + +

294 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAngenommenAm → NO_COVERAGE + +

295 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setFertigAm → NO_COVERAGE + +

296 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAbgeholtAm → NO_COVERAGE + +

297 + + + +

1.1
Location : mapAuftrag
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapAuftrag → NO_COVERAGE + +

301 + + + +

1.1
Location : getPositionen
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsAuftragWithPositionen()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getPositionen → KILLED + +

326 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]
Replaced integer addition with subtraction → KILLED + +

327 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]
removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → KILLED + +

328 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]
removed call to at/werkstatt/crm/model/Auftrag::setStatus → KILLED + +

335 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]
removed call to at/werkstatt/crm/model/Auftrag::setId → KILLED + +

338 + + + +

1.1
Location : neuerAuftrag
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
344 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuerAuftrag → KILLED + +

353 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]
negated conditional → KILLED + +

359 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]
negated conditional → KILLED + +

360 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsValidStatusTransitions()]
negated conditional → KILLED +

2.2
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_throwsExceptionIfStatusChangeNotPermitted()]
negated conditional → KILLED + +

363 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]
negated conditional → KILLED + +

364 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]
negated conditional → KILLED +

2.2
Location : setzeStatus
Killed by : none
negated conditional → NO_COVERAGE + +

367 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsBackToArbeitFromFertig()]
negated conditional → KILLED + +

368 + + + +

1.1
Location : setzeStatus
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
372 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsBackToArbeitFromFertig()]
negated conditional → KILLED + +

377 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]
negated conditional → KILLED + +

382 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]
negated conditional → KILLED + +

385 + + + +

1.1
Location : setzeStatus
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
392 + + + +

1.1
Location : setzeStatus
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeStatus → SURVIVED +
Covering tests +

+
397 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragNotFound()]
negated conditional → KILLED + +

400 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]
negated conditional → KILLED +

2.2
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragIsAbgeschlossen()]
negated conditional → KILLED + +

407 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]
removed call to at/werkstatt/crm/model/AuftragPosition::setId → KILLED + +

408 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]
removed call to at/werkstatt/crm/model/AuftragPosition::setAuftragId → KILLED + +

409 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuePosition → KILLED + +

424 + + + +

1.1
Location : getAlleRechnungen
Killed by : none
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleRechnungen → NO_COVERAGE + +

451 + + + +

1.1
Location : getRechnung
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getRechnung → SURVIVED +
Covering tests +

2.2
Location : getRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
negated conditional → KILLED + +

456 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setId → NO_COVERAGE + +

457 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setRechnungNr → NO_COVERAGE + +

458 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setAuftragId → NO_COVERAGE + +

459 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setAusgestelltAm → NO_COVERAGE + +

460 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setSummeNetto → NO_COVERAGE + +

461 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setUst → NO_COVERAGE + +

462 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setSummeBrutto → NO_COVERAGE + +

463 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setBezahlt → NO_COVERAGE + +

464 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setBezahltAm → NO_COVERAGE + +

465 + + + +

1.1
Location : mapRechnung
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapRechnung → NO_COVERAGE + +

474 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfAuftragNotFertig()]
negated conditional → KILLED + +

477 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfAuftragNotFertig()]
negated conditional → KILLED + +

483 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
changed conditional boundary → KILLED +

2.2
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfRechnungAlreadyExists()]
negated conditional → KILLED +

3.3
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfRechnungAlreadyExists()]
negated conditional → KILLED + +

489 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double multiplication with division → KILLED +

2.2
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double addition with subtraction → KILLED + +

491 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double multiplication with division → KILLED +

2.2
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double division with multiplication → KILLED + +

492 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double division with multiplication → KILLED +

2.2
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double multiplication with division → KILLED + +

493 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double multiplication with division → KILLED +

2.2
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double division with multiplication → KILLED +

3.3
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced double addition with subtraction → KILLED + +

499 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]
Replaced integer addition with subtraction → KILLED + +

506 + + + +

1.1
Location : erstelleRechnung
Killed by : none
removed call to java/io/PrintStream::println → SURVIVED +
Covering tests +

+
507 + + + +

1.1
Location : erstelleRechnung
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::erstelleRechnung → SURVIVED +
Covering tests +

+
512 + + + +

1.1
Location : setzeBezahlt
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeBezahlt → SURVIVED +
Covering tests +

+
532 + + + +

1.1
Location : getMonatsBericht
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returnsBerichtForYear()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getMonatsBericht → KILLED + +

553 + + + +

1.1
Location : getTopKunden
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getTopKunden_returnsTopKunden()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getTopKunden → KILLED + +

571 + + + +

1.1
Location : getAdminStatistik
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAdminStatistik_returnsStatistics()]
replaced return value with Collections.emptyMap for at/werkstatt/crm/service/WerkstattService::getAdminStatistik → KILLED + +

587 + + + +

1.1
Location : bereinigeStornierte
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:bereinigeStornierte_deletesOldStornierteAuftraege()]
replaced int return with 0 for at/werkstatt/crm/service/WerkstattService::bereinigeStornierte → KILLED + +

595 + + + +

1.1
Location : defaultString
Killed by : none
negated conditional → NO_COVERAGE + +

598 + + + +

1.1
Location : defaultString
Killed by : none
replaced return value with "" for at/werkstatt/crm/service/WerkstattService::defaultString → NO_COVERAGE + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleFahrzeuge_returnsAllFahrzeugeWithKundeName()] (15 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()] (11 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_filtersByStatus()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsBackToArbeitFromFertig()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsValidStatusTransitions()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_returnsNullIfNotFound()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_updatesExistingFahrzeug()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_returnsFahrzeugIfExists()] (7 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insertsNewFahrzeug()] (7 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getTopKunden_returnsTopKunden()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeBezahlt_setsRechnungAsPaid()] (17 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:bereinigeStornierte_deletesOldStornierteAuftraege()] (6 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfAuftragNotFertig()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfRechnungAlreadyExists()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragIsAbgeschlossen()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsAuftragWithPositionen()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_throwsExceptionIfStatusChangeNotPermitted()] (7 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_returnsKundeIfExists()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_updatesExistingKunde()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_insertsNewKunde()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_returnsNullIfNotFound()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAdminStatistik_returnsStatistics()] (17 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_returnsAllAuftraege()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsNullIfNotFound()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragNotFound()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfAuftragNotFound()] (6 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleKunden_returnsAllKunden()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeugeZuKunde_returnsFahrzeugeForKunde()] (6 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:loescheKunde_deletesKunde()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_includesAllFields()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returnsBerichtForYear()] (1549 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html new file mode 100644 index 0000000..49a89b1 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.service

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
184%
177/210
56%
62/111
73%
62/85
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
WerkstattService.java
84%
177/210
56%
62/111
73%
62/85
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..dba8785 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
184%
177/210
56%
62/111
73%
62/85
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.service1
84%
177/210
56%
62/111
73%
62/85
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..fc1ac8a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,114 @@ + + +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicebereinigeStornierte()I587org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator7425at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:bereinigeStornierte_deletesOldStornierteAuftraege()]replaced int return with 0 for at/werkstatt/crm/service/WerkstattService::bereinigeStornierte +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicedefaultString(Ljava/lang/String;)Ljava/lang/String;595org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator40negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicedefaultString(Ljava/lang/String;)Ljava/lang/String;598org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator132replaced return value with "" for at/werkstatt/crm/service/WerkstattService::defaultString +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;483org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator8029at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]changed conditional boundary +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;489org.pitest.mutationtest.engine.gregor.mutators.MathMutator12546at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;489org.pitest.mutationtest.engine.gregor.mutators.MathMutator12646at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;491org.pitest.mutationtest.engine.gregor.mutators.MathMutator13647at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;491org.pitest.mutationtest.engine.gregor.mutators.MathMutator14048at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double division with multiplication +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;492org.pitest.mutationtest.engine.gregor.mutators.MathMutator14848at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;492org.pitest.mutationtest.engine.gregor.mutators.MathMutator15249at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double division with multiplication +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;493org.pitest.mutationtest.engine.gregor.mutators.MathMutator15849at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;493org.pitest.mutationtest.engine.gregor.mutators.MathMutator16049at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;493org.pitest.mutationtest.engine.gregor.mutators.MathMutator16450at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced double division with multiplication +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;499org.pitest.mutationtest.engine.gregor.mutators.MathMutator20963at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]Replaced integer addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;474org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator101at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfAuftragNotFertig()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;477org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator3411at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfAuftragNotFertig()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;483org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator7727at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfRechnungAlreadyExists()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;483org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator8029at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_throwsExceptionIfRechnungAlreadyExists()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;506org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator27078removed call to java/io/PrintStream::println +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;507org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator27781replaced return value with null for at/werkstatt/crm/service/WerkstattService::erstelleRechnung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAdminStatistik()Ljava/util/Map;571org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator9116at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAdminStatistik_returnsStatistics()]replaced return value with Collections.emptyMap for at/werkstatt/crm/service/WerkstattService::getAdminStatistik +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAlleFahrzeuge()Ljava/util/List;156org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator152at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleFahrzeuge_returnsAllFahrzeugeWithKundeName()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleFahrzeuge +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAlleKunden()Ljava/util/List;53org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator152at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleKunden_returnsAllKunden()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleKunden +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAlleRechnungen()Ljava/util/List;424org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator152replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleRechnungen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;239org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator112changed conditional boundary +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;239org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator80at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_returnsAllAuftraege()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;239org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator112at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_filtersByStatus()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;244org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator4916at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_returnsAllAuftraege()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAuftraege +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftrag(J)Lat/werkstatt/crm/model/Auftrag;274org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator277at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsNullIfNotFound()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftrag(J)Lat/werkstatt/crm/model/Auftrag;278org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4611at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsAuftragWithPositionen()]removed call to at/werkstatt/crm/model/Auftrag::setPositionen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftrag(J)Lat/werkstatt/crm/model/Auftrag;279org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator5012at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragIsAbgeschlossen()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getAuftrag +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetFahrzeug(J)Lat/werkstatt/crm/model/Fahrzeug;184org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator237at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_returnsNullIfNotFound()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetFahrzeug(J)Lat/werkstatt/crm/model/Fahrzeug;184org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator3411at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_returnsFahrzeugIfExists()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getFahrzeug +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetFahrzeugeZuKunde(J)Ljava/util/List;170org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator207at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeugeZuKunde_returnsFahrzeugeForKunde()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getFahrzeugeZuKunde +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetKunde(J)Lat/werkstatt/crm/model/Kunde;120org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator237at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_returnsNullIfNotFound()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetKunde(J)Lat/werkstatt/crm/model/Kunde;123org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator3510at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_returnsKundeIfExists()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getKunde +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetMonatsBericht(I)Ljava/util/List;532org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator4113at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returnsBerichtForYear()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getMonatsBericht +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetPositionen(J)Ljava/util/List;301org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator207at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_returnsAuftragWithPositionen()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getPositionen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetRechnung(J)Lat/werkstatt/crm/model/Rechnung;451org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator277at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_createsRechnungWithCorrectAmounts()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetRechnung(J)Lat/werkstatt/crm/model/Rechnung;451org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator3811replaced return value with null for at/werkstatt/crm/service/WerkstattService::getRechnung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetTopKunden(I)Ljava/util/List;553org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator248at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getTopKunden_returnsTopKunden()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getTopKunden +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceloescheKunde(J)V146org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator124removed call to java/io/PrintStream::println +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;291org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6218negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;284org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator143removed call to at/werkstatt/crm/model/Auftrag::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;285org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator215removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;286org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator298removed call to at/werkstatt/crm/model/Auftrag::setFahrzeugId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;287org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator3711removed call to at/werkstatt/crm/model/Auftrag::setKundeId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;288org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4413removed call to at/werkstatt/crm/model/Auftrag::setStatus +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;289org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5115removed call to at/werkstatt/crm/model/Auftrag::setBeschreibung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;292org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6820removed call to at/werkstatt/crm/model/Auftrag::setKmStand +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;294org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator7622removed call to at/werkstatt/crm/model/Auftrag::setAngenommenAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;295org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator8324removed call to at/werkstatt/crm/model/Auftrag::setFertigAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;296org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator9026removed call to at/werkstatt/crm/model/Auftrag::setAbgeholtAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;297org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator9427replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapAuftrag +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;197org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6117negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;201org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator7922negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;190org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator143removed call to at/werkstatt/crm/model/Fahrzeug::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;191org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator226removed call to at/werkstatt/crm/model/Fahrzeug::setKundeId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;192org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator298removed call to at/werkstatt/crm/model/Fahrzeug::setKennzeichen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;193org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator3610removed call to at/werkstatt/crm/model/Fahrzeug::setMarke +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;194org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4312removed call to at/werkstatt/crm/model/Fahrzeug::setModell +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;195org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5014removed call to at/werkstatt/crm/model/Fahrzeug::setFahrgestellnr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;198org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6719removed call to at/werkstatt/crm/model/Fahrzeug::setBaujahr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;202org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator8524removed call to at/werkstatt/crm/model/Fahrzeug::setKmStand +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;204org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator9326removed call to at/werkstatt/crm/model/Fahrzeug::setPickerlDatum +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;205org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator10028removed call to at/werkstatt/crm/model/Fahrzeug::setAngelegtAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;206org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator10429at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleFahrzeuge_returnsAllFahrzeugeWithKundeName()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapFahrzeug +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;456org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator143removed call to at/werkstatt/crm/model/Rechnung::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;457org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator215removed call to at/werkstatt/crm/model/Rechnung::setRechnungNr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;458org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator298removed call to at/werkstatt/crm/model/Rechnung::setAuftragId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;459org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator3610removed call to at/werkstatt/crm/model/Rechnung::setAusgestelltAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;460org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4312removed call to at/werkstatt/crm/model/Rechnung::setSummeNetto +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;461org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5014removed call to at/werkstatt/crm/model/Rechnung::setUst +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;462org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5716removed call to at/werkstatt/crm/model/Rechnung::setSummeBrutto +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;463org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6418removed call to at/werkstatt/crm/model/Rechnung::setBezahlt +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;464org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator7120removed call to at/werkstatt/crm/model/Rechnung::setBezahltAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;465org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator7521replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapRechnung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;397org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator101at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragNotFound()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;400org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator3411at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_throwsExceptionIfAuftragIsAbgeschlossen()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;400org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator3914at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;407org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator10731at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]removed call to at/werkstatt/crm/model/AuftragPosition::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;408org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator11333at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]removed call to at/werkstatt/crm/model/AuftragPosition::setAuftragId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;409org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator11734at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_insertsPosition()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuePosition +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;326org.pitest.mutationtest.engine.gregor.mutators.MathMutator4413at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]Replaced integer addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;338org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator11627negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;327org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5517at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;328org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6018at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]removed call to at/werkstatt/crm/model/Auftrag::setStatus +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;335org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator11125at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]removed call to at/werkstatt/crm/model/Auftrag::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;344org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator16548at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_createsNewAuftragWithNumber()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuerAuftrag +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeBezahlt(J)Lat/werkstatt/crm/model/Rechnung;512org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator206replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeBezahlt +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;353org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator101at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;359org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator4211at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;360org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator4813at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsValidStatusTransitions()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;360org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator5215at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_throwsExceptionIfStatusChangeNotPermitted()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;363org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6518at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;364org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator7120at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;364org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator7522negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;367org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator8825at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsBackToArbeitFromFertig()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;368org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator9427negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;372org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator10530at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_allowsBackToArbeitFromFertig()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;377org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator11432at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;382org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator15448at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_setsTimestampsForStatusChanges()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;385org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator17255negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;392org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator23178replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeStatus +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereFahrzeug(Lat/werkstatt/crm/model/Fahrzeug;)Lat/werkstatt/crm/model/Fahrzeug;210org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator51at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_updatesExistingFahrzeug()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereFahrzeug(Lat/werkstatt/crm/model/Fahrzeug;)Lat/werkstatt/crm/model/Fahrzeug;217org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6911at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insertsNewFahrzeug()]removed call to at/werkstatt/crm/model/Fahrzeug::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereFahrzeug(Lat/werkstatt/crm/model/Fahrzeug;)Lat/werkstatt/crm/model/Fahrzeug;225org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator14427replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereFahrzeug +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereKunde(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;127org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator51at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_updatesExistingKunde()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereKunde(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;133org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator7212at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_insertsNewKunde()]removed call to at/werkstatt/crm/model/Kunde::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereKunde(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;141org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator16938at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_updatesExistingKunde()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereKunde +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesucheKunden(Ljava/lang/String;)Ljava/util/List;82org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator5119at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_includesAllFields()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::sucheKunden + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml new file mode 100644 index 0000000..8aece38 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt new file mode 100644 index 0000000..e00062f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.WerkstattServiceGeneratedTest +------------------------------------------------------------------------------- +Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.270 s -- in at.werkstatt.crm.gen.WerkstattServiceGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java new file mode 100644 index 0000000..308a7fd --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java @@ -0,0 +1,749 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.model.*; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.RowMapper; + +import java.sql.*; +import java.util.*; + +import static org.assertj.core.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +@ExtendWith(MockitoExtension.class) +class WerkstattServiceGeneratedTest { + + @Mock + private JdbcTemplate jdbcTemplate; + + private WerkstattService service; + + @Captor + private ArgumentCaptor sqlCaptor; + + @BeforeEach + void setUp() { + service = new WerkstattService(); + // Inject mock via reflection as constructor injection is not available + org.springframework.test.util.ReflectionTestUtils.setField(service, "jdbcTemplate", jdbcTemplate); + org.springframework.test.util.ReflectionTestUtils.setField(service, "ustSatz", 20); + } + + // --- KUNDE --- + + @Test + void getAlleKunden_returnsAllKunden() { + // Arrange + List expected = List.of(createKunde(1L, "Müller", "Hans")); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expected); + + // Act + List result = service.getAlleKunden(); + + // Assert + assertThat(result).isEqualTo(expected); + verify(jdbcTemplate).query(sqlCaptor.capture(), any(RowMapper.class)); + assertThat(sqlCaptor.getValue()).contains("SELECT * FROM kunde ORDER BY nachname, vorname"); + } + + @Test + void sucheKunden_includesAllFields() { + // Arrange + List expected = List.of(createKunde(1L, "Schmidt", "Anna")); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expected); + + // Act + List result = service.sucheKunden("schmidt"); + + // Assert + assertThat(result).isEqualTo(expected); + verify(jdbcTemplate).query(sqlCaptor.capture(), any(RowMapper.class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("lower(nachname) LIKE '%schmidt%'"); + assertThat(sql).contains("lower(vorname) LIKE '%schmidt%'"); + assertThat(sql).contains("lower(ort) LIKE '%schmidt%'"); + } + + @Test + void getKunde_returnsKundeIfExists() { + // Arrange + Kunde expected = createKunde(1L, "Mayer", "Klaus"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(expected)); + + // Act + Kunde result = service.getKunde(1L); + + // Assert + assertThat(result).isEqualTo(expected); + } + + @Test + void getKunde_returnsNullIfNotFound() { + // Arrange + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(Collections.emptyList()); + + // Act + Kunde result = service.getKunde(999L); + + // Assert + assertThat(result).isNull(); + } + + @Test + void speichereKunde_insertsNewKunde() { + // Arrange + Kunde kunde = new Kunde(); + kunde.setAnrede("Herr"); + kunde.setVorname("Max"); + kunde.setNachname("Mustermann"); + kunde.setTelefon("0664/1234567"); + kunde.setEmail("max@example.com"); + kunde.setStrasse("Hauptstr. 1"); + kunde.setPlz("1010"); + kunde.setOrt("Wien"); + kunde.setNotiz("Test"); + + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(123L); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(kunde)); // getKunde after insert + + // Act + Kunde result = service.speichereKunde(kunde); + + // Assert + assertThat(result.getId()).isEqualTo(123L); + verify(jdbcTemplate).queryForObject(sqlCaptor.capture(), eq(Long.class), any(Object[].class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("INSERT INTO kunde"); + assertThat(sql).contains("RETURNING id"); + } + + @Test + void speichereKunde_updatesExistingKunde() { + // Arrange + Kunde kunde = new Kunde(); + kunde.setId(1L); + kunde.setAnrede("Frau"); + kunde.setVorname("Erika"); + kunde.setNachname("Musterfrau"); + kunde.setTelefon("0664/9876543"); + kunde.setEmail("erika@example.com"); + kunde.setStrasse("Nebenstr. 2"); + kunde.setPlz("1020"); + kunde.setOrt("Wien"); + kunde.setNotiz("Update"); + + // Mock getKunde to return updated kunde + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(kunde)); + + // Act + Kunde result = service.speichereKunde(kunde); + + // Assert + assertThat(result.getId()).isEqualTo(1L); + verify(jdbcTemplate).update(sqlCaptor.capture(), any(Object[].class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("UPDATE kunde SET"); + assertThat(sql).contains("WHERE id=?"); + } + + @Test + void loescheKunde_deletesKunde() { + // Act + service.loescheKunde(1L); + + // Assert + verify(jdbcTemplate).update(sqlCaptor.capture()); + assertThat(sqlCaptor.getValue()).contains("DELETE FROM kunde WHERE id = 1"); + } + + // --- FAHRZEUG --- + + @Test + void getAlleFahrzeuge_returnsAllFahrzeugeWithKundeName() throws SQLException { + // Arrange + List expected = new ArrayList<>(); + ResultSet rs = mock(ResultSet.class); + when(rs.getLong("id")).thenReturn(1L); + when(rs.getLong("kunde_id")).thenReturn(10L); + when(rs.getString("kennzeichen")).thenReturn("W-AB 123"); + when(rs.getString("marke")).thenReturn("BMW"); + when(rs.getString("modell")).thenReturn("X1"); + when(rs.getString("fahrgestellnr")).thenReturn("WBA123456"); + when(rs.getInt("baujahr")).thenReturn(2020); + when(rs.wasNull()).thenReturn(false); + when(rs.getInt("km_stand")).thenReturn(15000); + when(rs.wasNull()).thenReturn(false); + when(rs.getDate("pickerl_datum")).thenReturn(new java.sql.Date(0)); + when(rs.getTimestamp("angelegt_am")).thenReturn(new Timestamp(System.currentTimeMillis())); + when(rs.getString("nachname")).thenReturn("Müller"); + when(rs.getString("vorname")).thenReturn("Hans"); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenAnswer(invocation -> { + RowMapper mapper = invocation.getArgument(1); + return List.of(mapper.mapRow(rs, 0)); + }); + + // Act + List result = service.getAlleFahrzeuge(); + + // Assert + assertThat(result).hasSize(1); + assertThat(result.get(0).getKundeName()).isEqualTo("Müller Hans"); + } + + @Test + void getFahrzeugeZuKunde_returnsFahrzeugeForKunde() { + // Arrange + List expected = List.of(createFahrzeug(1L, 10L, "W-AB 123")); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expected); + + // Act + List result = service.getFahrzeugeZuKunde(10L); + + // Assert + assertThat(result).isEqualTo(expected); + verify(jdbcTemplate).query(sqlCaptor.capture(), any(RowMapper.class)); + assertThat(sqlCaptor.getValue()).contains("WHERE kunde_id = 10"); + } + + @Test + void getFahrzeug_returnsFahrzeugIfExists() { + // Arrange + Fahrzeug expected = createFahrzeug(1L, 10L, "W-AB 123"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(expected)); + + // Act + Fahrzeug result = service.getFahrzeug(1L); + + // Assert + assertThat(result).isEqualTo(expected); + } + + @Test + void getFahrzeug_returnsNullIfNotFound() { + // Arrange + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(Collections.emptyList()); + + // Act + Fahrzeug result = service.getFahrzeug(999L); + + // Assert + assertThat(result).isNull(); + } + + @Test + void speichereFahrzeug_insertsNewFahrzeug() { + // Arrange + Fahrzeug fahrzeug = createFahrzeug(null, 10L, "W-AB 123"); + fahrzeug.setMarke("BMW"); + fahrzeug.setModell("X1"); + fahrzeug.setFahrgestellnr("WBA123"); + fahrzeug.setBaujahr(2020); + fahrzeug.setKmStand(15000); + + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(123L); + + // Act + service.speichereFahrzeug(fahrzeug); + + // Assert + assertThat(fahrzeug.getId()).isEqualTo(123L); + verify(jdbcTemplate).queryForObject(sqlCaptor.capture(), eq(Long.class), any(Object[].class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("INSERT INTO fahrzeug"); + assertThat(sql).contains("RETURNING id"); + } + + @Test + void speichereFahrzeug_updatesExistingFahrzeug() { + // Arrange + Fahrzeug fahrzeug = createFahrzeug(1L, 10L, "W-AB 123"); + fahrzeug.setMarke("BMW"); + fahrzeug.setModell("X1"); + fahrzeug.setFahrgestellnr("WBA123"); + fahrzeug.setBaujahr(2020); + fahrzeug.setKmStand(15000); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(fahrzeug)); + + // Act + service.speichereFahrzeug(fahrzeug); + + // Assert + verify(jdbcTemplate).update(sqlCaptor.capture(), any(Object[].class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("UPDATE fahrzeug SET"); + assertThat(sql).contains("WHERE id=?"); + } + + @Test + void loescheFahrzeug_deletesFahrzeug() { + // Act + service.loescheFahrzeug(1L); + + // Assert + verify(jdbcTemplate).update(sqlCaptor.capture()); + assertThat(sqlCaptor.getValue()).contains("DELETE FROM fahrzeug WHERE id = 1"); + } + + // --- AUFTRAG --- + + @Test + void getAuftraege_returnsAllAuftraege() { + // Arrange + List expected = List.of(createAuftrag(1L, 10L, 20L, "ANGENOMMEN")); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expected); + + // Act + List result = service.getAuftraege(null); + + // Assert + assertThat(result).isEqualTo(expected); + verify(jdbcTemplate).query(sqlCaptor.capture(), any(RowMapper.class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("FROM auftrag a LEFT JOIN kunde k"); + assertThat(sql).contains("ORDER BY a.angenommen_am DESC"); + } + + @Test + void getAuftraege_filtersByStatus() { + // Arrange + List expected = List.of(createAuftrag(1L, 10L, 20L, "IN_ARBEIT")); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expected); + + // Act + service.getAuftraege("IN_ARBEIT"); + + // Assert + verify(jdbcTemplate).query(sqlCaptor.capture(), any(RowMapper.class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("WHERE a.status = 'IN_ARBEIT'"); + } + + @Test + void getAuftrag_returnsAuftragWithPositionen() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "FERTIG"); + List positions = List.of(createPosition(1L, 1L, "ARBEIT", "Reparatur", 2.0, 100.0)); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)) + .thenReturn(positions); + + // Act + Auftrag result = service.getAuftrag(1L); + + // Assert + assertThat(result).isEqualTo(auftrag); + assertThat(result.getPositionen()).isEqualTo(positions); + } + + @Test + void getAuftrag_returnsNullIfNotFound() { + // Arrange + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(Collections.emptyList()); + + // Act + Auftrag result = service.getAuftrag(999L); + + // Assert + assertThat(result).isNull(); + } + + @Test + void neuerAuftrag_createsNewAuftragWithNumber() { + // Arrange + Auftrag auftrag = createAuftrag(null, 10L, 20L, null); + auftrag.setBeschreibung("Reparatur"); + auftrag.setKmStand(15000); + + Calendar cal = Calendar.getInstance(); + int jahr = cal.get(Calendar.YEAR); + + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))) + .thenReturn(42); // max number + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(123L); // new id + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act + Auftrag result = service.neuerAuftrag(auftrag); + + // Assert + assertThat(result.getAuftragNr()).isEqualTo("A-" + jahr + "-0043"); + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_ANGENOMMEN); + assertThat(result.getId()).isEqualTo(123L); + } + + @Test + void setzeStatus_throwsExceptionIfStatusChangeNotPermitted() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "ANGENOMMEN"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act & Assert + assertThatThrownBy(() -> service.setzeStatus(1L, "ABGEHOLT")) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("nicht erlaubt"); + } + + @Test + void setzeStatus_allowsValidStatusTransitions() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "ANGENOMMEN"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act + service.setzeStatus(1L, "IN_ARBEIT"); + + // Assert — the new status is written to the DB; the returned Auftrag is re-read via the mock + verify(jdbcTemplate).update(sqlCaptor.capture()); + assertThat(sqlCaptor.getValue()).contains("status = 'IN_ARBEIT'"); + } + + @Test + void setzeStatus_allowsBackToArbeitFromFertig() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "FERTIG"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act + service.setzeStatus(1L, "IN_ARBEIT"); + + // Assert — the new status is written to the DB; the returned Auftrag is re-read via the mock + verify(jdbcTemplate).update(sqlCaptor.capture()); + assertThat(sqlCaptor.getValue()).contains("status = 'IN_ARBEIT'"); + } + + @Test + void setzeStatus_setsTimestampsForStatusChanges() { + // Arrange — FERTIG is only reachable from IN_ARBEIT + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "IN_ARBEIT"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act + service.setzeStatus(1L, "FERTIG"); + + // Assert + verify(jdbcTemplate).update(sqlCaptor.capture()); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("fertig_am = now()"); + } + + @Test + void neuePosition_throwsExceptionIfAuftragNotFound() { + // Arrange + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(Collections.emptyList()); + + // Act & Assert + assertThatThrownBy(() -> service.neuePosition(999L, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("nicht gefunden"); + } + + @Test + void neuePosition_throwsExceptionIfAuftragIsAbgeschlossen() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "ABGEHOLT"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act & Assert + assertThatThrownBy(() -> service.neuePosition(1L, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("abgeschlossen"); + } + + @Test + void neuePosition_insertsPosition() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "IN_ARBEIT"); + AuftragPosition position = new AuftragPosition(); + position.setTyp("MATERIAL"); + position.setBezeichnung("Bremsbelag"); + position.setMenge(2.0); + position.setEinzelpreis(50.0); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(123L); + + // Act + AuftragPosition result = service.neuePosition(1L, position); + + // Assert + assertThat(result.getId()).isEqualTo(123L); + assertThat(result.getAuftragId()).isEqualTo(1L); + verify(jdbcTemplate).queryForObject(sqlCaptor.capture(), eq(Long.class), any(Object[].class)); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("INSERT INTO auftrag_position"); + assertThat(sql).contains("RETURNING id"); + } + + @Test + void loeschePosition_deletesPosition() { + // Act + service.loeschePosition(1L); + + // Assert + verify(jdbcTemplate).update(sqlCaptor.capture()); + assertThat(sqlCaptor.getValue()).contains("DELETE FROM auftrag_position WHERE id = 1"); + } + + // --- RECHNUNG --- + + @Test + void erstelleRechnung_throwsExceptionIfAuftragNotFound() { + // Arrange + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(Collections.emptyList()); + + // Act & Assert + assertThatThrownBy(() -> service.erstelleRechnung(999L)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("nicht gefunden"); + } + + @Test + void erstelleRechnung_throwsExceptionIfAuftragNotFertig() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "IN_ARBEIT"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)); + + // Act & Assert + assertThatThrownBy(() -> service.erstelleRechnung(1L)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("nur bei Status FERTIG"); + } + + @Test + void erstelleRechnung_throwsExceptionIfRechnungAlreadyExists() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "FERTIG"); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)) + .thenReturn(Collections.emptyList()); + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(1); // count > 0 + + // Act & Assert + assertThatThrownBy(() -> service.erstelleRechnung(1L)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("gibt es schon eine Rechnung"); + } + + @Test + void erstelleRechnung_createsRechnungWithCorrectAmounts() { + // Arrange + Auftrag auftrag = createAuftrag(1L, 10L, 20L, "FERTIG"); + List positions = List.of( + createPosition(1L, 1L, "ARBEIT", "Reparatur", 2.0, 100.0) + ); + auftrag.setPositionen(positions); + + Calendar cal = Calendar.getInstance(); + int jahr = cal.get(Calendar.YEAR); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(auftrag)) // getAuftrag + .thenReturn(positions) // getPositionen + .thenReturn(Collections.emptyList()); // getRechnung after insert + when(jdbcTemplate.queryForObject(contains("COUNT(*) FROM rechnung"), eq(Integer.class))) + .thenReturn(0); // no existing rechnung + when(jdbcTemplate.queryForObject(contains("MAX("), eq(Integer.class))) + .thenReturn(42); // max rechnung nr + List insertArgs = new ArrayList<>(); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenAnswer(inv -> { + insertArgs.add(inv.getArguments()); + return 123L; // new rechnung id + }); + + // Act + service.erstelleRechnung(1L); + + // Assert — the computed amounts are observable as the INSERT arguments + Object[] werte = insertArgs.get(0); + assertThat((String) werte[0]).contains("INSERT INTO rechnung"); + assertThat(werte[2]).isEqualTo("R-" + jahr + "-0043"); + assertThat(werte[4]).isEqualTo(200.0); + assertThat(werte[5]).isEqualTo(40.0); + assertThat(werte[6]).isEqualTo(240.0); + } + + @Test + void setzeBezahlt_setsRechnungAsPaid() { + // Arrange + Rechnung rechnung = new Rechnung(); + rechnung.setId(1L); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenReturn(List.of(rechnung)); + + // Act + service.setzeBezahlt(1L); + + // Assert + verify(jdbcTemplate).update(sqlCaptor.capture()); + String sql = sqlCaptor.getValue(); + assertThat(sql).contains("bezahlt = true"); + assertThat(sql).contains("bezahlt_am = now()"); + } + + // --- BERICHT --- + + @Test + void getMonatsBericht_returnsBerichtForYear() throws SQLException { + // Arrange + List expected = new ArrayList<>(); + ResultSet rs = mock(ResultSet.class); + when(rs.getInt("monat")).thenReturn(1); + when(rs.getInt("anzahl_auftraege")).thenReturn(5); + when(rs.getInt("anzahl_rechnungen")).thenReturn(3); + when(rs.getDouble("umsatz_netto")).thenReturn(1000.0); + when(rs.getDouble("umsatz_brutto")).thenReturn(1200.0); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))) + .thenAnswer(invocation -> { + RowMapper mapper = invocation.getArgument(1); + return List.of(mapper.mapRow(rs, 0)); + }); + + // Act + List result = service.getMonatsBericht(2023); + + // Assert + assertThat(result).hasSize(1); + assertThat(result.get(0).getJahr()).isEqualTo(2023); + assertThat(result.get(0).getMonat()).isEqualTo(1); + assertThat(result.get(0).getAnzahlAuftraege()).isEqualTo(5); + assertThat(result.get(0).getAnzahlRechnungen()).isEqualTo(3); + assertThat(result.get(0).getUmsatzNetto()).isEqualTo(1000.0); + assertThat(result.get(0).getUmsatzBrutto()).isEqualTo(1200.0); + } + + @Test + void getTopKunden_returnsTopKunden() { + // Arrange + List> expected = List.of(Map.of( + "id", 1L, + "nachname", "Müller", + "vorname", "Hans", + "anzahl_auftraege", 5, + "umsatz", 1200.0 + )); + when(jdbcTemplate.queryForList(anyString())).thenReturn(expected); + + // Act + List> result = service.getTopKunden(2023); + + // Assert + assertThat(result).isEqualTo(expected); + } + + // --- ADMIN --- + + @Test + void getAdminStatistik_returnsStatistics() { + // Arrange + when(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM kunde", Integer.class)).thenReturn(10); + when(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM fahrzeug", Integer.class)).thenReturn(20); + when(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM auftrag", Integer.class)).thenReturn(30); + when(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM auftrag WHERE status IN ('ANGENOMMEN','IN_ARBEIT')", Integer.class)).thenReturn(5); + when(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM rechnung", Integer.class)).thenReturn(15); + when(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM rechnung WHERE bezahlt = false", Integer.class)).thenReturn(3); + + // Act + Map result = service.getAdminStatistik(); + + // Assert + assertThat(result).hasSize(7); + assertThat(result.get("kunden")).isEqualTo(10); + assertThat(result.get("fahrzeuge")).isEqualTo(20); + assertThat(result.get("auftraege")).isEqualTo(30); + assertThat(result.get("auftraegeOffen")).isEqualTo(5); + assertThat(result.get("rechnungen")).isEqualTo(15); + assertThat(result.get("rechnungenOffen")).isEqualTo(3); + assertThat(result.get("stand")).isNotNull(); + } + + @Test + void bereinigeStornierte_deletesOldStornierteAuftraege() { + // Arrange + List ids = List.of(1L, 2L); + when(jdbcTemplate.queryForList(anyString(), eq(Long.class))).thenReturn(ids); + + // Act + int deleted = service.bereinigeStornierte(); + + // Assert + assertThat(deleted).isEqualTo(2); + verify(jdbcTemplate, times(4)).update(sqlCaptor.capture()); + List capturedSqls = sqlCaptor.getAllValues(); + assertThat(capturedSqls).anyMatch(sql -> sql.contains("DELETE FROM auftrag_position")); + assertThat(capturedSqls).anyMatch(sql -> sql.contains("DELETE FROM auftrag WHERE id =")); + } + + // --- HELPERS --- + + private Kunde createKunde(Long id, String nachname, String vorname) { + Kunde k = new Kunde(); + k.setId(id); + k.setNachname(nachname); + k.setVorname(vorname); + return k; + } + + private Fahrzeug createFahrzeug(Long id, Long kundeId, String kennzeichen) { + Fahrzeug f = new Fahrzeug(); + f.setId(id); + f.setKundeId(kundeId); + f.setKennzeichen(kennzeichen); + return f; + } + + private Auftrag createAuftrag(Long id, Long kundeId, Long fahrzeugId, String status) { + Auftrag a = new Auftrag(); + a.setId(id); + a.setKundeId(kundeId); + a.setFahrzeugId(fahrzeugId); + a.setStatus(status); + return a; + } + + private AuftragPosition createPosition(Long id, Long auftragId, String typ, String bezeichnung, double menge, double einzelpreis) { + AuftragPosition p = new AuftragPosition(); + p.setId(id); + p.setAuftragId(auftragId); + p.setTyp(typ); + p.setBezeichnung(bezeichnung); + p.setMenge(menge); + p.setEinzelpreis(einzelpreis); + return p; + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..f194058 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..356bb91 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,186 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @27c86f2d (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AuftragControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.967 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:20:53 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:20:53 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:20:53 AM PIT >> INFO : Sending 1 test classes to minion +11:20:53 AM PIT >> INFO : Sent tests to minion +11:20:54 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/-\|/-\|/-11:20:55 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:20:55 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:20:55 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()]) took 866 ms +11:20:55 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusException()]) covered 7 blocks +11:20:55 AM PIT >> INFO : Created 1 mutation test units +/11:20:57 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 10 Killed 10 (100%) +> KILLED 10 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()]) took 866 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusException()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 19/19 (100%) +>> 1 tests examined +>> Generated 13 mutations Killed 13 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 13 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 11.289 s +[INFO] Finished at: 2026-08-02T11:20:57+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html new file mode 100644 index 0000000..aef9c24 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html @@ -0,0 +1,1338 @@ + + + + + + + + + +

AuftragController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.List;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +16 + + + + + + +
+ +17 + + + + + + +
import at.werkstatt.crm.model.Auftrag;
+ +18 + + + + + + +
import at.werkstatt.crm.model.AuftragPosition;
+ +19 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +20 + + + + + + +
+ +21 + + + + + + +
@RestController
+ +22 + + + + + + +
@RequestMapping("/api/auftraege")
+ +23 + + + + + + +
public class AuftragController {
+ +24 + + + + + + +
+ +25 + + + + + + +
	@Autowired
+ +26 + + + + + + +
	private WerkstattService werkstattService;
+ +27 + + + + + + +
+ +28 + + + + + + +
	@GetMapping
+ +29 + + + + + + +
	public List<Auftrag> liste(@RequestParam(value = "status", required = false) String status) {
+ +30 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED
+ +
+
+
		return werkstattService.getAuftraege(status);
+ +31 + + + + + + +
	}
+ +32 + + + + + + +
+ +33 + + + + + + +
	@GetMapping("/{id}")
+ +34 + + + + + + +
	public ResponseEntity<Auftrag> einzeln(@PathVariable long id) {
+ +35 + + + + + + +
		Auftrag auftrag = werkstattService.getAuftrag(id);
+ +36 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
		if (auftrag == null) {
+ +37 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
			return ResponseEntity.notFound().build();
+ +38 + + + + + + +
		}
+ +39 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
		return ResponseEntity.ok(auftrag);
+ +40 + + + + + + +
	}
+ +41 + + + + + + +
+ +42 + + + + + + +
	@PostMapping
+ +43 + + + + + + +
	public ResponseEntity<?> anlegen(@RequestBody Auftrag auftrag) {
+ +44 + + + + + + +
		try {
+ +45 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.neuerAuftrag(auftrag));
+ +46 + + + + + + +
		} catch (Exception e) {
+ +47 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +48 + + + + + + +
		}
+ +49 + + + + + + +
	}
+ +50 + + + + + + +
+ +51 + + + + + + +
	// Statuswechsel als PUT mit Query-Parameter, hat sich so eingebuergert
+ +52 + + + + + + +
	@PutMapping("/{id}/status")
+ +53 + + + + + + +
	public ResponseEntity<?> status(@PathVariable long id, @RequestParam("neu") String neuerStatus) {
+ +54 + + + + + + +
		try {
+ +55 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.setzeStatus(id, neuerStatus));
+ +56 + + + + + + +
		} catch (Exception e) {
+ +57 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +58 + + + + + + +
		}
+ +59 + + + + + + +
	}
+ +60 + + + + + + +
+ +61 + + + + + + +
	@PostMapping("/{id}/positionen")
+ +62 + + + + + + +
	public ResponseEntity<?> position(@PathVariable long id, @RequestBody AuftragPosition position) {
+ +63 + + + + + + +
		try {
+ +64 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.neuePosition(id, position));
+ +65 + + + + + + +
		} catch (Exception e) {
+ +66 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +67 + + + + + + +
		}
+ +68 + + + + + + +
	}
+ +69 + + + + + + +
+ +70 + + + + + + +
	@DeleteMapping("/positionen/{positionId}")
+ +71 + + + + + + +
	public ResponseEntity<?> positionLoeschen(@PathVariable long positionId) {
+ +72 + + + + + + +
		try {
+ +73 + + +1 + +1. positionLoeschen : removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED
+ +
+
+
			werkstattService.loeschePosition(positionId);
+ +74 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
			return ResponseEntity.ok().build();
+ +75 + + + + + + +
		} catch (Exception e) {
+ +76 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +77 + + + + + + +
		}
+ +78 + + + + + + +
	}
+ +79 + + + + + + +
+ +80 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeOhneStatusFilter()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED + +

36 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnNotFound()]
negated conditional → KILLED + +

37 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnNotFound()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnFound()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

45 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenSuccess()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

47 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

55 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusWithNullNeuerStatus()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

57 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

64 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionWithNullIdInPosition()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

66 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

73 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()]
removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED + +

74 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

76 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenException()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionWithNullIdInPosition()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionWithNullPosition()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionSuccess()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()] (866 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusWithNullNeuerStatus()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusWithEmptyNeuerStatus()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusSuccess()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeOhneStatusFilter()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeMitLeeremStatus()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeMitStatusFilter()] (12 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnNotFound()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnWithNegativeId()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenSuccess()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenWithNullIdInAuftrag()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenWithNullAuftrag()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnFound()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenWithNegativeId()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenWithZeroId()] (7 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionException()] (8 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusException()] (2 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..1609538 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
100%
13/13
100%
13/13
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AuftragController.java
100%
19/19
100%
13/13
100%
13/13
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..6b12824 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
100%
13/13
100%
13/13
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
19/19
100%
13/13
100%
13/13
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..98b7a3d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,16 @@ + + +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;45org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenSuccess()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;47org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;36org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnNotFound()]negated conditional +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;37org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnNotFound()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnFound()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeOhneStatusFilter()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;64org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionWithNullIdInPosition()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;66org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;73org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()]removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;76org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;55org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusWithNullNeuerStatus()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;57org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml new file mode 100644 index 0000000..c427acc --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt new file mode 100644 index 0000000..1c13209 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AuftragControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.967 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java new file mode 100644 index 0000000..f48da9d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java @@ -0,0 +1,365 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.AuftragController; +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.*; + +@ExtendWith(MockitoExtension.class) +class AuftragControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + @InjectMocks + private AuftragController auftragController; + + private Auftrag auftrag; + private AuftragPosition position; + + @BeforeEach + void setUp() { + auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2024-001"); + auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN); + auftrag.setKundeId(10L); + auftrag.setFahrzeugId(20L); + auftrag.setBeschreibung("Reparatur"); + auftrag.setKmStand(120000); + + position = new AuftragPosition(); + position.setId(100L); + position.setTyp(AuftragPosition.TYP_ARBEIT); + position.setBezeichnung("Bremsen gewechselt"); + position.setMenge(1.0); + position.setEinzelpreis(150.0); + } + + @Test + void listeMitStatusFilter() { + // Arrange + String status = Auftrag.STATUS_IN_ARBEIT; + when(werkstattService.getAuftraege(status)).thenReturn(Arrays.asList(auftrag)); + + // Act + var result = auftragController.liste(status); + + // Assert + assertThat(result).hasSize(1); + assertThat(result.get(0).getStatus()).isEqualTo(Auftrag.STATUS_ANGENOMMEN); + verify(werkstattService).getAuftraege(status); + } + + @Test + void listeOhneStatusFilter() { + // Arrange + when(werkstattService.getAuftraege(null)).thenReturn(Arrays.asList(auftrag)); + + // Act + var result = auftragController.liste(null); + + // Assert + assertThat(result).hasSize(1); + verify(werkstattService).getAuftraege(null); + } + + @Test + void listeMitLeeremStatus() { + // Arrange + when(werkstattService.getAuftraege("")).thenReturn(Collections.emptyList()); + + // Act + var result = auftragController.liste(""); + + // Assert + assertThat(result).isEmpty(); + verify(werkstattService).getAuftraege(""); + } + + @Test + void einzelnFound() { + // Arrange + when(werkstattService.getAuftrag(1L)).thenReturn(auftrag); + + // Act + var result = auftragController.einzeln(1L); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(auftrag); + verify(werkstattService).getAuftrag(1L); + } + + @Test + void einzelnNotFound() { + // Arrange + when(werkstattService.getAuftrag(999L)).thenReturn(null); + + // Act + var result = auftragController.einzeln(999L); + + // Assert + assertThat(result.getStatusCode().is4xxClientError()).isTrue(); + assertThat(result.getBody()).isNull(); + verify(werkstattService).getAuftrag(999L); + } + + @Test + void anlegenSuccess() { + // Arrange + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenReturn(auftrag); + + // Act + var result = auftragController.anlegen(auftrag); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(auftrag); + verify(werkstattService).neuerAuftrag(auftrag); + } + + @Test + void anlegenException() { + // Arrange + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenThrow(new RuntimeException("DB error")); + + // Act + var result = auftragController.anlegen(auftrag); + + // Assert + assertThat(result.getStatusCode().is5xxServerError()).isTrue(); + assertThat(result.getBody()).isEqualTo("DB error"); + verify(werkstattService).neuerAuftrag(auftrag); + } + + @Test + void statusSuccess() { + // Arrange + String neuerStatus = Auftrag.STATUS_IN_ARBEIT; + when(werkstattService.setzeStatus(eq(1L), eq(neuerStatus))).thenReturn(auftrag); + + // Act + var result = auftragController.status(1L, neuerStatus); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(1L, neuerStatus); + } + + @Test + void statusException() { + // Arrange + String neuerStatus = "UNGUELTIG"; + when(werkstattService.setzeStatus(eq(1L), eq(neuerStatus))).thenThrow(new IllegalArgumentException("Invalid status")); + + // Act + var result = auftragController.status(1L, neuerStatus); + + // Assert + assertThat(result.getStatusCode().is5xxServerError()).isTrue(); + assertThat(result.getBody()).isEqualTo("Invalid status"); + verify(werkstattService).setzeStatus(1L, neuerStatus); + } + + @Test + void positionSuccess() { + // Arrange + when(werkstattService.neuePosition(eq(1L), any(AuftragPosition.class))).thenReturn(position); + + // Act + var result = auftragController.position(1L, position); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(position); + verify(werkstattService).neuePosition(1L, position); + } + + @Test + void positionException() { + // Arrange + when(werkstattService.neuePosition(eq(1L), any(AuftragPosition.class))) + .thenThrow(new IllegalStateException("Position invalid")); + + // Act + var result = auftragController.position(1L, position); + + // Assert + assertThat(result.getStatusCode().is5xxServerError()).isTrue(); + assertThat(result.getBody()).isEqualTo("Position invalid"); + verify(werkstattService).neuePosition(1L, position); + } + + @Test + void positionLoeschenSuccess() { + // Arrange + doNothing().when(werkstattService).loeschePosition(100L); + + // Act + var result = auftragController.positionLoeschen(100L); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isNull(); + verify(werkstattService).loeschePosition(100L); + } + + @Test + void positionLoeschenException() { + // Arrange + doThrow(new RuntimeException("DB constraint violation")).when(werkstattService).loeschePosition(100L); + + // Act + var result = auftragController.positionLoeschen(100L); + + // Assert + assertThat(result.getStatusCode().is5xxServerError()).isTrue(); + assertThat(result.getBody()).isEqualTo("DB constraint violation"); + verify(werkstattService).loeschePosition(100L); + } + + @Test + void positionLoeschenWithZeroId() { + // Arrange + doNothing().when(werkstattService).loeschePosition(0L); + + // Act + var result = auftragController.positionLoeschen(0L); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void anlegenWithNullAuftrag() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenReturn(auftrag); + + // Act + var result = auftragController.anlegen(null); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(auftrag); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void statusWithEmptyNeuerStatus() { + // Arrange + when(werkstattService.setzeStatus(eq(1L), eq(""))).thenReturn(auftrag); + + // Act + var result = auftragController.status(1L, ""); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(1L, ""); + } + + @Test + void positionWithNullPosition() { + // Arrange + when(werkstattService.neuePosition(1L, null)).thenReturn(position); + + // Act + var result = auftragController.position(1L, null); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(position); + verify(werkstattService).neuePosition(1L, null); + } + + @Test + void einzelnWithNegativeId() { + // Arrange + when(werkstattService.getAuftrag(-1L)).thenReturn(null); + + // Act + var result = auftragController.einzeln(-1L); + + // Assert + assertThat(result.getStatusCode().is4xxClientError()).isTrue(); + verify(werkstattService).getAuftrag(-1L); + } + + @Test + void anlegenWithNullIdInAuftrag() { + // Arrange + Auftrag auftragWithoutId = new Auftrag(); + auftragWithoutId.setAuftragNr("A-2024-002"); + when(werkstattService.neuerAuftrag(auftragWithoutId)).thenReturn(auftrag); + + // Act + var result = auftragController.anlegen(auftragWithoutId); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + verify(werkstattService).neuerAuftrag(auftragWithoutId); + } + + @Test + void positionWithNullIdInPosition() { + // Arrange + AuftragPosition positionWithoutId = new AuftragPosition(); + positionWithoutId.setTyp(AuftragPosition.TYP_MATERIAL); + positionWithoutId.setBezeichnung("Schrauben"); + positionWithoutId.setMenge(10.0); + positionWithoutId.setEinzelpreis(0.5); + when(werkstattService.neuePosition(1L, positionWithoutId)).thenReturn(position); + + // Act + var result = auftragController.position(1L, positionWithoutId); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + verify(werkstattService).neuePosition(1L, positionWithoutId); + } + + @Test + void statusWithNullNeuerStatus() { + // Arrange + when(werkstattService.setzeStatus(eq(1L), eq(null))).thenReturn(auftrag); + + // Act + var result = auftragController.status(1L, null); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(result.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(1L, null); + } + + @Test + void positionLoeschenWithNegativeId() { + // Arrange + doNothing().when(werkstattService).loeschePosition(-100L); + + // Act + var result = auftragController.positionLoeschen(-100L); + + // Assert + assertThat(result.getStatusCode().is2xxSuccessful()).isTrue(); + verify(werkstattService).loeschePosition(-100L); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..f8348ed --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..0a8d3d3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/maven-test.log @@ -0,0 +1,192 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @501edcf1 (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.KundenControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.849 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:21:06 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:21:06 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:21:06 AM PIT >> INFO : Sending 1 test classes to minion +11:21:06 AM PIT >> INFO : Sent tests to minion +11:21:07 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/11:21:07 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:21:07 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:21:07 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithWhitespaceOnlySucheReturnsAllKunden()]) took 836 ms +11:21:07 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithValidSucheReturnsSuchergebnis()]) covered 9 blocks +11:21:07 AM PIT >> INFO : Created 1 mutation test units +/11:21:10 AM PIT >> INFO : Completed in 4 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 3 Killed 2 (67%) +> KILLED 2 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 7 Killed 7 (100%) +> KILLED 7 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 2 seconds +-------------------------------------------------------------------------------- +> Total : 4 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithWhitespaceOnlySucheReturnsAllKunden()]) took 836 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithValidSucheReturnsSuchergebnis()]) covered 9 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 19/19 (100%) +>> 1 tests examined +>> Generated 17 mutations Killed 16 (94%) +>> Mutations with no coverage 0. Test strength 94% +>> Ran 20 tests (1.18 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 11.879 s +[INFO] Finished at: 2026-08-02T11:21:10+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html new file mode 100644 index 0000000..96379f3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html @@ -0,0 +1,1345 @@ + + + + + + + + + +

KundenController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.List;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +16 + + + + + + +
+ +17 + + + + + + +
import at.werkstatt.crm.model.Fahrzeug;
+ +18 + + + + + + +
import at.werkstatt.crm.model.Kunde;
+ +19 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +20 + + + + + + +
+ +21 + + + + + + +
@RestController
+ +22 + + + + + + +
@RequestMapping("/api/kunden")
+ +23 + + + + + + +
public class KundenController {
+ +24 + + + + + + +
+ +25 + + + + + + +
	@Autowired
+ +26 + + + + + + +
	private WerkstattService werkstattService;
+ +27 + + + + + + +
+ +28 + + + + + + +
	@GetMapping
+ +29 + + + + + + +
	public List<Kunde> liste(@RequestParam(value = "suche", required = false) String suche) {
+ +30 + + +3 + +1. liste : negated conditional → KILLED
+2. liste : changed conditional boundary → KILLED
+3. liste : negated conditional → KILLED
+ +
+
+
		if (suche != null && suche.trim().length() > 0) {
+ +31 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
			return werkstattService.sucheKunden(suche.trim());
+ +32 + + + + + + +
		}
+ +33 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
		return werkstattService.getAlleKunden();
+ +34 + + + + + + +
	}
+ +35 + + + + + + +
+ +36 + + + + + + +
	@GetMapping("/{id}")
+ +37 + + + + + + +
	public ResponseEntity<Kunde> einzeln(@PathVariable long id) {
+ +38 + + + + + + +
		Kunde kunde = werkstattService.getKunde(id);
+ +39 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
		if (kunde == null) {
+ +40 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
			return ResponseEntity.notFound().build();
+ +41 + + + + + + +
		}
+ +42 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
		return ResponseEntity.ok(kunde);
+ +43 + + + + + + +
	}
+ +44 + + + + + + +
+ +45 + + + + + + +
	@GetMapping("/{id}/fahrzeuge")
+ +46 + + + + + + +
	public List<Fahrzeug> fahrzeuge(@PathVariable long id) {
+ +47 + + +1 + +1. fahrzeuge : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED
+ +
+
+
		return werkstattService.getFahrzeugeZuKunde(id);
+ +48 + + + + + + +
	}
+ +49 + + + + + + +
+ +50 + + + + + + +
	@PostMapping
+ +51 + + + + + + +
	public Kunde anlegen(@RequestBody Kunde kunde) {
+ +52 + + + + + + +
		// keine Validierung, das Frontend schickt schon das Richtige
+ +53 + + +1 + +1. anlegen : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
		kunde.setId(null);
+ +54 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED
+ +
+
+
		return werkstattService.speichereKunde(kunde);
+ +55 + + + + + + +
	}
+ +56 + + + + + + +
+ +57 + + + + + + +
	@PutMapping("/{id}")
+ +58 + + + + + + +
	public ResponseEntity<?> aendern(@PathVariable long id, @RequestBody Kunde kunde) {
+ +59 + + + + + + +
		try {
+ +60 + + +1 + +1. aendern : removed call to at/werkstatt/crm/model/Kunde::setId → SURVIVED
+ +
+
+
			kunde.setId(id);
+ +61 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.speichereKunde(kunde));
+ +62 + + + + + + +
		} catch (Exception e) {
+ +63 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +64 + + + + + + +
		}
+ +65 + + + + + + +
	}
+ +66 + + + + + + +
+ +67 + + + + + + +
	@DeleteMapping("/{id}")
+ +68 + + + + + + +
	public ResponseEntity<?> loeschen(@PathVariable long id) {
+ +69 + + + + + + +
		try {
+ +70 + + +1 + +1. loeschen : removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED
+ +
+
+
			werkstattService.loescheKunde(id);
+ +71 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
			return ResponseEntity.ok().build();
+ +72 + + + + + + +
		} catch (Exception e) {
+ +73 + + + + + + +
			// Meldung 1:1 zum Client, hilft beim Support-Telefonat
+ +74 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +75 + + + + + + +
		}
+ +76 + + + + + + +
	}
+ +77 + + + + + + +
+ +78 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()]
negated conditional → KILLED +

2.2
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()]
changed conditional boundary → KILLED +

3.3
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithNullSucheReturnsAllKunden()]
negated conditional → KILLED + +

31 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithValidSucheReturnsSuchergebnis()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

33 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_foundReturnsOk()]
negated conditional → KILLED + +

40 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_notFoundReturns404()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

42 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_foundReturnsOk()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

47 + + + +

1.1
Location : fahrzeuge
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_returnsList()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED + +

53 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setsOriginalIdToNullBeforeSaving()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

54 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setsIdToNullAndSaves()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED + +

60 + + + +

1.1
Location : aendern
Killed by : none
removed call to at/werkstatt/crm/model/Kunde::setId → SURVIVED +
Covering tests +

+
61 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_successReturnsUpdatedKunde()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

63 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendren_exceptionReturns500WithError()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

70 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_successReturns200()]
removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED + +

71 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_successReturns200()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

74 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_exceptionReturns500WithError()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithValidSucheReturnsSuchergebnis()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithWhitespaceOnlySucheReturnsAllKunden()] (836 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_successReturnsUpdatedKunde()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendren_exceptionReturns500WithError()] (14 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setsIdToNullAndSaves()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setsOriginalIdToNullBeforeSaving()] (6 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_exceptionReturns500WithError()] (4 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_successReturns200()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithNullSucheReturnsAllKunden()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_notFoundReturns404()] (5 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_foundReturnsOk()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_returnsList()] (4 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..6d0d328 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
94%
16/17
94%
16/17
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
KundenController.java
100%
19/19
94%
16/17
94%
16/17
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..16433c3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
19/19
94%
16/17
94%
16/17
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
19/19
94%
16/17
94%
16/17
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..8286e5e --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,20 @@ + + +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;60org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator61removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;61org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator154at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendern_successReturnsUpdatedKunde()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;63org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator278at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:aendren_exceptionReturns500WithError()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;53org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator50at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setsOriginalIdToNullBeforeSaving()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;54org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator122at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:anlegen_setsIdToNullAndSaves()]replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_foundReturnsOk()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;40org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_notFoundReturns404()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;42org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:einzeln_foundReturnsOk()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllerfahrzeuge(J)Ljava/util/List;47org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:fahrzeuge_returnsList()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()]changed conditional boundary +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator40at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithNullSucheReturnsAllKunden()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;31org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator166at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithValidSucheReturnsSuchergebnis()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;33org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator238at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:listeWithEmptyStringSucheReturnsAllKunden()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;70org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_successReturns200()]removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;71org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_successReturns200()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[method:loeschen_exceptionReturns500WithError()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml new file mode 100644 index 0000000..d47df16 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt new file mode 100644 index 0000000..b26babc --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.KundenControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.849 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java new file mode 100644 index 0000000..1d13b04 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java @@ -0,0 +1,269 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.KundenController; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.springframework.http.ResponseEntity; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.mockito.MockitoAnnotations.openMocks; + +class KundenControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + @InjectMocks + private KundenController kundenController; + + @BeforeEach + void setUp() { + openMocks(this); + } + + @Test + void listeWithNullSucheReturnsAllKunden() { + // Given + List expectedKunden = Arrays.asList(createKunde(1L), createKunde(2L)); + when(werkstattService.getAlleKunden()).thenReturn(expectedKunden); + + // When + List result = kundenController.liste(null); + + // Then + assertThat(result).isEqualTo(expectedKunden); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void listeWithEmptyStringSucheReturnsAllKunden() { + // Given + List expectedKunden = Arrays.asList(createKunde(1L)); + when(werkstattService.getAlleKunden()).thenReturn(expectedKunden); + + // When + List result = kundenController.liste(""); + + // Then + assertThat(result).isEqualTo(expectedKunden); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void listeWithWhitespaceOnlySucheReturnsAllKunden() { + // Given + List expectedKunden = Arrays.asList(createKunde(1L)); + when(werkstattService.getAlleKunden()).thenReturn(expectedKunden); + + // When + List result = kundenController.liste(" \t "); + + // Then + assertThat(result).isEqualTo(expectedKunden); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void listeWithValidSucheReturnsSuchergebnis() { + // Given + String suche = "Max"; + List suchergebnis = Arrays.asList(createKunde(1L)); + when(werkstattService.sucheKunden("Max")).thenReturn(suchergebnis); + + // When + List result = kundenController.liste(suche); + + // Then + assertThat(result).isEqualTo(suchergebnis); + verify(werkstattService, never()).getAlleKunden(); + verify(werkstattService).sucheKunden("Max"); + } + + @Test + void einzeln_foundReturnsOk() { + // Given + long id = 42L; + Kunde expectedKunde = createKunde(id); + when(werkstattService.getKunde(id)).thenReturn(expectedKunde); + + // When + ResponseEntity response = kundenController.einzeln(id); + + // Then + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(expectedKunde); + verify(werkstattService).getKunde(id); + } + + @Test + void einzeln_notFoundReturns404() { + // Given + long id = 999L; + when(werkstattService.getKunde(id)).thenReturn(null); + + // When + ResponseEntity response = kundenController.einzeln(id); + + // Then + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getKunde(id); + } + + @Test + void fahrzeuge_returnsList() { + // Given + long kundeId = 10L; + List fahrzeuge = Arrays.asList(createFahrzeug(1L, kundeId), createFahrzeug(2L, kundeId)); + when(werkstattService.getFahrzeugeZuKunde(kundeId)).thenReturn(fahrzeuge); + + // When + List result = kundenController.fahrzeuge(kundeId); + + // Then + assertThat(result).isEqualTo(fahrzeuge); + verify(werkstattService).getFahrzeugeZuKunde(kundeId); + } + + @Test + void anlegen_setsIdToNullAndSaves() { + // Given + Kunde kunde = createKunde(null); + kunde.setNachname("Mustermann"); + Kunde savedKunde = createKunde(1L); + savedKunde.setNachname("Mustermann"); + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(savedKunde); + + // When + Kunde result = kundenController.anlegen(kunde); + + // Then + assertThat(result.getId()).isEqualTo(1L); + assertThat(result.getNachname()).isEqualTo("Mustermann"); + verify(werkstattService).speichereKunde(any(Kunde.class)); // Verifies the passed object has id null + } + + @Test + void anlegen_setsOriginalIdToNullBeforeSaving() { + // Given + Kunde kunde = createKunde(999L); + kunde.setNachname(" TEST "); + Kunde expectedSaved = createKunde(1L); + when(werkstattService.speichereKunde(any(Kunde.class))).thenAnswer(invocation -> { + Kunde arg = invocation.getArgument(0); + assertThat(arg.getId()).isNull(); // assert id was cleared + return arg; + }); + + // When + kundenController.anlegen(kunde); + + // Then + verify(werkstattService).speichereKunde(any(Kunde.class)); + } + + @Test + void aendern_successReturnsUpdatedKunde() { + // Given + long id = 5L; + Kunde updatedInput = createKunde(null); + updatedInput.setNachname("Neu"); + Kunde savedKunde = createKunde(id); + savedKunde.setNachname("Neu"); + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(savedKunde); + + // When + ResponseEntity response = kundenController.aendern(id, updatedInput); + + // Then + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + @SuppressWarnings("unchecked") + Kunde body = (Kunde) response.getBody(); + assertThat(body).isEqualTo(savedKunde); + assertThat(body.getId()).isEqualTo(id); + verify(werkstattService).speichereKunde(any(Kunde.class)); + } + + @Test + void aendren_exceptionReturns500WithError() { + // Given + long id = 7L; + Kunde updatedInput = createKunde(null); + String errorMsg = "DB error"; + doThrow(new RuntimeException(errorMsg)).when(werkstattService).speichereKunde(any(Kunde.class)); + + // When + ResponseEntity response = kundenController.aendern(id, updatedInput); + + // Then + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody().toString()).contains(errorMsg); + verify(werkstattService).speichereKunde(any(Kunde.class)); + } + + @Test + void loeschen_successReturns200() { + // Given + long id = 12L; + + // When + ResponseEntity response = kundenController.loeschen(id); + + // Then + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + verify(werkstattService).loescheKunde(id); + } + + @Test + void loeschen_exceptionReturns500WithError() { + // Given + long id = 13L; + String errorMsg = "Fremdschlüsselverletzung"; + doThrow(new RuntimeException(errorMsg)).when(werkstattService).loescheKunde(id); + + // When + ResponseEntity response = kundenController.loeschen(id); + + // Then + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody().toString()).contains(errorMsg); + verify(werkstattService).loescheKunde(id); + } + + private Kunde createKunde(Long id) { + Kunde kunde = new Kunde(); + kunde.setId(id); + kunde.setVorname("Max"); + kunde.setNachname("Mustermann"); + return kunde; + } + + private Fahrzeug createFahrzeug(Long id, Long kundeId) { + Fahrzeug fahrzeug = new Fahrzeug(); + fahrzeug.setId(id); + fahrzeug.setKundeId(kundeId); + fahrzeug.setKennzeichen("W-F 001"); + return fahrzeug; + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..54eddf3 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..34f0e86 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,186 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @501edcf1 (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +log4j:WARN Please initialize the log4j system properly. +log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.879 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:21:18 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:21:18 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:21:19 AM PIT >> INFO : Sending 1 test classes to minion +11:21:19 AM PIT >> INFO : Sent tests to minion +11:21:19 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:21:20 AM PIT >> INFO : MINION : log4j:WARN No appenders could be found for logger (org.springframework.test.util.ReflectionTestUtils). +11:21:20 AM PIT >> INFO : MINION : log4j:WARN Please initialize the log4j system properly. +11:21:20 AM PIT >> INFO : MINION : log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. +/-\|/-\|/-11:21:20 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:21:20 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:21:20 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungNotFound()]) took 755 ms +11:21:20 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_throwsExceptionWithNullMessage_handledGracefully()]) covered 7 blocks +11:21:20 AM PIT >> INFO : Created 1 mutation test units +/11:21:22 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 6 Killed 6 (100%) +> KILLED 6 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 2 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungNotFound()]) took 755 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_throwsExceptionWithNullMessage_handledGracefully()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 12/12 (100%) +>> 1 tests examined +>> Generated 8 mutations Killed 8 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 8 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 11.037 s +[INFO] Finished at: 2026-08-02T11:21:22+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html new file mode 100644 index 0000000..e31293f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html @@ -0,0 +1,937 @@ + + + + + + + + + +

RechnungController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.List;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +13 + + + + + + +
+ +14 + + + + + + +
import at.werkstatt.crm.model.Rechnung;
+ +15 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +16 + + + + + + +
+ +17 + + + + + + +
@RestController
+ +18 + + + + + + +
@RequestMapping("/api/rechnungen")
+ +19 + + + + + + +
public class RechnungController {
+ +20 + + + + + + +
+ +21 + + + + + + +
	@Autowired
+ +22 + + + + + + +
	private WerkstattService werkstattService;
+ +23 + + + + + + +
+ +24 + + + + + + +
	@GetMapping
+ +25 + + + + + + +
	public List<Rechnung> liste() {
+ +26 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED
+ +
+
+
		return werkstattService.getAlleRechnungen();
+ +27 + + + + + + +
	}
+ +28 + + + + + + +
+ +29 + + + + + + +
	@GetMapping("/{id}")
+ +30 + + + + + + +
	public ResponseEntity<Rechnung> einzeln(@PathVariable long id) {
+ +31 + + + + + + +
		Rechnung rechnung = werkstattService.getRechnung(id);
+ +32 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
		if (rechnung == null) {
+ +33 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
			return ResponseEntity.notFound().build();
+ +34 + + + + + + +
		}
+ +35 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
		return ResponseEntity.ok(rechnung);
+ +36 + + + + + + +
	}
+ +37 + + + + + + +
+ +38 + + + + + + +
	@PostMapping("/auftrag/{auftragId}")
+ +39 + + + + + + +
	public ResponseEntity<?> erstellen(@PathVariable long auftragId) {
+ +40 + + + + + + +
		try {
+ +41 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.erstelleRechnung(auftragId));
+ +42 + + + + + + +
		} catch (Exception e) {
+ +43 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +44 + + + + + + +
		}
+ +45 + + + + + + +
	}
+ +46 + + + + + + +
+ +47 + + + + + + +
	@PutMapping("/{id}/bezahlt")
+ +48 + + + + + + +
	public ResponseEntity<?> bezahlt(@PathVariable long id) {
+ +49 + + + + + + +
		try {
+ +50 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
			return ResponseEntity.ok(werkstattService.setzeBezahlt(id));
+ +51 + + + + + + +
		} catch (Exception e) {
+ +52 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
			return ResponseEntity.status(500).body(e.getMessage());
+ +53 + + + + + + +
		}
+ +54 + + + + + + +
	}
+ +55 + + + + + + +
+ +56 + + + + + + +
}

Mutations

26 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED + +

32 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]
negated conditional → KILLED + +

33 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungNotFound()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

35 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

41 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsCreatedRechnung_whenSuccessful()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

43 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

50 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsUpdatedRechnung_whenSuccessful()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

52 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_throwsExceptionWithNullMessage_handledGracefully()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsCreatedRechnung_whenSuccessful()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()] (2 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsEmptyList_whenNoRechnungen()] (12 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungNotFound()] (755 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsUpdatedRechnung_whenSuccessful()] (3 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_throwsExceptionWithNullMessage_handledGracefully()] (2 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsInternalServerError_whenExceptionThrown()] (8 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()] (2 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_throwsExceptionWithNullMessage_handledGracefully()] (2 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..1b3de81 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
12/12
100%
8/8
100%
8/8
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
RechnungController.java
100%
12/12
100%
8/8
100%
8/8
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..6c44f95 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
12/12
100%
8/8
100%
8/8
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
12/12
100%
8/8
100%
8/8
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..e861873 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,11 @@ + + +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;50org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsUpdatedRechnung_whenSuccessful()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;52org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_throwsExceptionWithNullMessage_handledGracefully()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;32org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]negated conditional +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;33org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungNotFound()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;35org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;41org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsCreatedRechnung_whenSuccessful()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;43org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerliste()Ljava/util/List;26org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator61at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml new file mode 100644 index 0000000..658ce28 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt new file mode 100644 index 0000000..f0a1564 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.879 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java new file mode 100644 index 0000000..256ce3b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java @@ -0,0 +1,219 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.RechnungController; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.Mockito.*; + +class RechnungControllerGeneratedTest { + + private WerkstattService werkstattService; + private RechnungController rechnungController; + + private Rechnung rechnung1; + private Rechnung rechnung2; + + @BeforeEach + void setUp() { + werkstattService = Mockito.mock(WerkstattService.class); + rechnungController = new RechnungController(); + + // Inject mock via ReflectionTestUtils since no constructor injection + org.springframework.test.util.ReflectionTestUtils.setField(rechnungController, "werkstattService", werkstattService); + + // Prepare test data + rechnung1 = new Rechnung(); + rechnung1.setId(1L); + rechnung1.setRechnungNr("R-2024-001"); + rechnung1.setAuftragId(10L); + rechnung1.setAusgestelltAm(new Date()); + rechnung1.setSummeNetto(100.0); + rechnung1.setUst(20.0); + rechnung1.setSummeBrutto(120.0); + rechnung1.setBezahlt(false); + rechnung1.setAuftragNr("A-2024-001"); + rechnung1.setKundeName("Max Mustermann"); + + rechnung2 = new Rechnung(); + rechnung2.setId(2L); + rechnung2.setRechnungNr("R-2024-002"); + rechnung2.setAuftragId(11L); + rechnung2.setAusgestelltAm(new Date()); + rechnung2.setSummeNetto(200.0); + rechnung2.setUst(40.0); + rechnung2.setSummeBrutto(240.0); + rechnung2.setBezahlt(true); + rechnung2.setBezahltAm(new Date()); + rechnung2.setAuftragNr("A-2024-002"); + rechnung2.setKundeName("Erika Musterfrau"); + } + + @Test + void liste_returnsAllRechnungen() { + // Arrange + List expected = Arrays.asList(rechnung1, rechnung2); + when(werkstattService.getAlleRechnungen()).thenReturn(expected); + + // Act + List result = rechnungController.liste(); + + // Assert + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAlleRechnungen(); + } + + @Test + void liste_returnsEmptyList_whenNoRechnungen() { + // Arrange + List expected = List.of(); + when(werkstattService.getAlleRechnungen()).thenReturn(expected); + + // Act + List result = rechnungController.liste(); + + // Assert + assertThat(result).isEmpty(); + verify(werkstattService).getAlleRechnungen(); + } + + @Test + void einzeln_returnsRechnung_whenFound() { + // Arrange + long id = 1L; + when(werkstattService.getRechnung(id)).thenReturn(rechnung1); + + // Act + var response = rechnungController.einzeln(id); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(rechnung1); + verify(werkstattService).getRechnung(id); + } + + @Test + void einzeln_returnsNotFound_whenRechnungNotFound() { + // Arrange + long id = 999L; + when(werkstattService.getRechnung(id)).thenReturn(null); + + // Act + var response = rechnungController.einzeln(id); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getStatusCode().value()).isEqualTo(404); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getRechnung(id); + } + + @Test + void erstellen_returnsCreatedRechnung_whenSuccessful() { + // Arrange + long auftragId = 10L; + when(werkstattService.erstelleRechnung(auftragId)).thenReturn(rechnung1); + + // Act + var response = rechnungController.erstellen(auftragId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(rechnung1); + verify(werkstattService).erstelleRechnung(auftragId); + } + + @Test + void erstellen_returnsInternalServerError_whenExceptionThrown() { + // Arrange + long auftragId = 10L; + String errorMsg = "Auftrag nicht gefunden"; + when(werkstattService.erstelleRechnung(auftragId)).thenThrow(new RuntimeException(errorMsg)); + + // Act + var response = rechnungController.erstellen(auftragId); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).erstelleRechnung(auftragId); + } + + @Test + void bezahlt_returnsUpdatedRechnung_whenSuccessful() { + // Arrange + long id = 1L; + Rechnung updatedRechnung = new Rechnung(); + updatedRechnung.setId(id); + updatedRechnung.setBezahlt(true); + updatedRechnung.setBezahltAm(new Date()); + when(werkstattService.setzeBezahlt(id)).thenReturn(updatedRechnung); + + // Act + var response = rechnungController.bezahlt(id); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(updatedRechnung); + verify(werkstattService).setzeBezahlt(id); + } + + @Test + void bezahlt_returnsInternalServerError_whenExceptionThrown() { + // Arrange + long id = 1L; + String errorMsg = "Rechnung nicht gefunden"; + when(werkstattService.setzeBezahlt(id)).thenThrow(new RuntimeException(errorMsg)); + + // Act + var response = rechnungController.bezahlt(id); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).setzeBezahlt(id); + } + + @Test + void erstellen_throwsExceptionWithNullMessage_handledGracefully() { + // Arrange + long auftragId = 10L; + when(werkstattService.erstelleRechnung(auftragId)).thenThrow(new RuntimeException((String) null)); + + // Act + var response = rechnungController.erstellen(auftragId); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isNull(); // Spring handles null message as null body + verify(werkstattService).erstelleRechnung(auftragId); + } + + @Test + void bezahlt_throwsExceptionWithNullMessage_handledGracefully() { + // Arrange + long id = 1L; + when(werkstattService.setzeBezahlt(id)).thenThrow(new RuntimeException((String) null)); + + // Act + var response = rechnungController.bezahlt(id); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeBezahlt(id); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..3765b94 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..047a1a4 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/maven-test.log @@ -0,0 +1,168 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @10db82ae (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AdminControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.955 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:21:31 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:21:31 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:21:31 AM PIT >> INFO : Sending 1 test classes to minion +11:21:31 AM PIT >> INFO : Sent tests to minion +11:21:31 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\11:21:32 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:21:32 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:21:32 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_callsGsonOnlyOnce()]) took 878 ms +11:21:32 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_postMapping_returnsAdminView_withMeldung()]) covered 16 blocks +11:21:32 AM PIT >> INFO : Created 1 mutation test units +/11:21:34 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_callsGsonOnlyOnce()]) took 878 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_postMapping_returnsAdminView_withMeldung()]) covered 16 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 17/17 (100%) +>> 1 tests examined +>> Generated 2 mutations Killed 2 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 8 tests (4 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 10.930 s +[INFO] Finished at: 2026-08-02T11:21:34+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html new file mode 100644 index 0000000..dc6a4ba --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html @@ -0,0 +1,887 @@ + + + + + + + + + +

AdminController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.Map;
+ +4 + + + + + + +
+ +5 + + + + + + +
import org.springframework.beans.factory.annotation.Autowired;
+ +6 + + + + + + +
import org.springframework.beans.factory.annotation.Value;
+ +7 + + + + + + +
import org.springframework.stereotype.Controller;
+ +8 + + + + + + +
import org.springframework.ui.Model;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +11 + + + + + + +
+ +12 + + + + + + +
import com.google.gson.Gson;
+ +13 + + + + + + +
+ +14 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +15 + + + + + + +
+ +16 + + + + + + +
/**
+ +17 + + + + + + +
 * Alte Admin-Seite als JSP, stammt noch aus der Tomcat-Zeit vor Spring Boot.
+ +18 + + + + + + +
 * Wird nur vom Chef verwendet. Kein Login davor - die Seite kennt eh niemand.
+ +19 + + + + + + +
 */
+ +20 + + + + + + +
@Controller
+ +21 + + + + + + +
public class AdminController {
+ +22 + + + + + + +
+ +23 + + + + + + +
	@Autowired
+ +24 + + + + + + +
	private WerkstattService werkstattService;
+ +25 + + + + + + +
+ +26 + + + + + + +
	@Value("${werkstatt.firma.name}")
+ +27 + + + + + + +
	private String firmaName;
+ +28 + + + + + + +
+ +29 + + + + + + +
	@Value("${werkstatt.version:?}")
+ +30 + + + + + + +
	private String version;
+ +31 + + + + + + +
+ +32 + + + + + + +
	// gson statt jackson, weil das Beispiel damals aus einem Forum kopiert wurde
+ +33 + + + + + + +
	private Gson gson = new Gson();
+ +34 + + + + + + +
+ +35 + + + + + + +
	@GetMapping("/admin")
+ +36 + + + + + + +
	public String admin(Model model) {
+ +37 + + + + + + +
		Map<String, Object> statistik = werkstattService.getAdminStatistik();
+ +38 + + + + + + +
		model.addAttribute("statistik", statistik);
+ +39 + + + + + + +
		model.addAttribute("statistikJson", gson.toJson(statistik));
+ +40 + + + + + + +
		model.addAttribute("firmaName", firmaName);
+ +41 + + + + + + +
		model.addAttribute("version", version);
+ +42 + + + + + + +
		model.addAttribute("meldung", null);
+ +43 + + +1 + +1. admin : replaced return value with "" for at/werkstatt/crm/controller/AdminController::admin → KILLED
+ +
+
+
		return "admin";
+ +44 + + + + + + +
	}
+ +45 + + + + + + +
+ +46 + + + + + + +
	@PostMapping("/admin/bereinigen")
+ +47 + + + + + + +
	public String bereinigen(Model model) {
+ +48 + + + + + + +
		int anzahl = werkstattService.bereinigeStornierte();
+ +49 + + + + + + +
		Map<String, Object> statistik = werkstattService.getAdminStatistik();
+ +50 + + + + + + +
		model.addAttribute("statistik", statistik);
+ +51 + + + + + + +
		model.addAttribute("statistikJson", gson.toJson(statistik));
+ +52 + + + + + + +
		model.addAttribute("firmaName", firmaName);
+ +53 + + + + + + +
		model.addAttribute("version", version);
+ +54 + + + + + + +
		model.addAttribute("meldung", anzahl + " stornierte Aufträge wurden endgültig gelöscht.");
+ +55 + + +1 + +1. bereinigen : replaced return value with "" for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED
+ +
+
+
		return "admin";
+ +56 + + + + + + +
	}
+ +57 + + + + + + +
+ +58 + + + + + + +
}

Mutations

43 + + + +

1.1
Location : admin
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_getMapping_returnsAdminView_withStatistikAndFirmaName()]
replaced return value with "" for at/werkstatt/crm/controller/AdminController::admin → KILLED + +

55 + + + +

1.1
Location : bereinigen
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_postMapping_returnsAdminView_withMeldung()]
replaced return value with "" for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_setsNullMeldation()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_callsGsonWithCorrectStatistik()] (3 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_doesNotThrowException_whenServiceReturnsEmptyStatistik()] (4 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_getMapping_returnsAdminView_withStatistikAndFirmaName()] (6 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_callsGsonOnlyOnce()] (878 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withLargeNumber_returnsCorrectMeldung()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_callsGsonOnlyOnce()] (2 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_setsMeldationWithCorrectFormat()] (3 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_postMapping_returnsAdminView_withMeldung()] (6 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_withZeroDeleted_returnsCorrectMeldung()] (6 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_doesNotThrowException_whenServiceReturnsEmptyStatistik()] (49 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..a8b30f7 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
17/17
100%
2/2
100%
2/2
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AdminController.java
100%
17/17
100%
2/2
100%
2/2
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..5a1f43b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
17/17
100%
2/2
100%
2/2
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
17/17
100%
2/2
100%
2/2
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..d264f45 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,5 @@ + + +AdminController.javaat.werkstatt.crm.controller.AdminControlleradmin(Lorg/springframework/ui/Model;)Ljava/lang/String;43org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator507at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:admin_getMapping_returnsAdminView_withStatistikAndFirmaName()]replaced return value with "" for at/werkstatt/crm/controller/AdminController::admin +AdminController.javaat.werkstatt.crm.controller.AdminControllerbereinigen(Lorg/springframework/ui/Model;)Ljava/lang/String;55org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator6312at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_postMapping_returnsAdminView_withMeldung()]replaced return value with "" for at/werkstatt/crm/controller/AdminController::bereinigen + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml new file mode 100644 index 0000000..9dd0ad5 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt new file mode 100644 index 0000000..a965f7c --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AdminControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.955 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java new file mode 100644 index 0000000..773c894 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s3-admincontroller/repaired/AdminControllerGeneratedTest.java @@ -0,0 +1,233 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.AdminController; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.ui.Model; +import org.springframework.util.ReflectionUtils; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatCode; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.ArgumentMatchers.isNull; +import static org.mockito.Mockito.*; + +@ExtendWith(MockitoExtension.class) +class AdminControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + @Mock + private Model model; + + @Captor + private ArgumentCaptor> mapCaptor; + + private AdminController adminController; + + @BeforeEach + void setUp() { + adminController = new AdminController(); + // Inject mock via reflection since no constructor injection is available + Field field = ReflectionUtils.findField(AdminController.class, "werkstattService"); + ReflectionUtils.makeAccessible(field); + ReflectionUtils.setField(field, adminController, werkstattService); + } + + @Test + void admin_getMapping_returnsAdminView_withStatistikAndFirmaName() { + // Arrange + Map statistik = new HashMap<>(); + statistik.put("totalAuftraege", 42L); + statistik.put("offeneAuftraege", 10L); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + // Act + String viewName = adminController.admin(model); + + // Assert + assertThat(viewName).isEqualTo("admin"); + verify(model, times(1)).addAttribute("statistik", statistik); + verify(model, times(1)).addAttribute(eq("statistikJson"), any(String.class)); + verify(model, times(1)).addAttribute(eq("firmaName"), isNull()); + verify(model, times(1)).addAttribute(eq("version"), isNull()); + verify(model, times(1)).addAttribute("meldung", null); + + // Verify JSON is valid (basic check) + ArgumentCaptor jsonCaptor = ArgumentCaptor.forClass(String.class); + verify(model).addAttribute(eq("statistikJson"), jsonCaptor.capture()); + String json = jsonCaptor.getValue(); + assertThat(json).isNotBlank(); + assertThat(json).contains("\"totalAuftraege\":42"); + } + + @Test + void bereinigen_postMapping_returnsAdminView_withMeldung() { + // Arrange + int anzahlGeloescht = 5; + Map statistik = new HashMap<>(); + statistik.put("totalAuftraege", 37L); + statistik.put("offeneAuftraege", 8L); + + when(werkstattService.bereinigeStornierte()).thenReturn(anzahlGeloescht); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + // Act + String viewName = adminController.bereinigen(model); + + // Assert + assertThat(viewName).isEqualTo("admin"); + verify(werkstattService, times(1)).bereinigeStornierte(); + verify(werkstattService, times(1)).getAdminStatistik(); + + verify(model, times(1)).addAttribute("statistik", statistik); + verify(model, times(1)).addAttribute(eq("statistikJson"), any(String.class)); + verify(model, times(1)).addAttribute(eq("firmaName"), isNull()); + verify(model, times(1)).addAttribute(eq("version"), isNull()); + + ArgumentCaptor meldungCaptor = ArgumentCaptor.forClass(String.class); + verify(model).addAttribute(eq("meldung"), meldungCaptor.capture()); + assertThat(meldungCaptor.getValue()) + .isEqualTo(anzahlGeloescht + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_withZeroDeleted_returnsCorrectMeldung() { + // Arrange + int anzahlGeloescht = 0; + Map statistik = new HashMap<>(); + when(werkstattService.bereinigeStornierte()).thenReturn(anzahlGeloescht); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + // Act + adminController.bereinigen(model); + + // Assert + ArgumentCaptor meldungCaptor = ArgumentCaptor.forClass(String.class); + verify(model).addAttribute(eq("meldung"), meldungCaptor.capture()); + assertThat(meldungCaptor.getValue()) + .isEqualTo("0 stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_withLargeNumber_returnsCorrectMeldung() { + // Arrange + int anzahlGeloescht = 12345; + Map statistik = new HashMap<>(); + when(werkstattService.bereinigeStornierte()).thenReturn(anzahlGeloescht); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + // Act + adminController.bereinigen(model); + + // Assert + ArgumentCaptor meldungCaptor = ArgumentCaptor.forClass(String.class); + verify(model).addAttribute(eq("meldung"), meldungCaptor.capture()); + assertThat(meldungCaptor.getValue()) + .isEqualTo("12345 stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void admin_callsGsonWithCorrectStatistik() { + // Arrange + Map statistik = new HashMap<>(); + statistik.put("key", "value"); + when(werkstattService.getAdminStatistik()).thenReturn(statistik); + + // Act + adminController.admin(model); + + // Assert + ArgumentCaptor jsonCaptor = ArgumentCaptor.forClass(String.class); + verify(model).addAttribute(eq("statistikJson"), jsonCaptor.capture()); + String json = jsonCaptor.getValue(); + assertThat(json).contains("\"key\":\"value\""); + } + + @Test + void admin_setsNullMeldation() { + // Arrange + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act + adminController.admin(model); + + // Assert + verify(model).addAttribute("meldung", null); + } + + @Test + void bereinigen_setsMeldationWithCorrectFormat() { + // Arrange + int anzahl = 3; + when(werkstattService.bereinigeStornierte()).thenReturn(anzahl); + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act + adminController.bereinigen(model); + + // Assert + ArgumentCaptor meldungCaptor = ArgumentCaptor.forClass(String.class); + verify(model).addAttribute(eq("meldung"), meldungCaptor.capture()); + String meldung = meldungCaptor.getValue(); + assertThat(meldung).matches("\\d+ stornierte Aufträge wurden endgültig gelöscht\\."); + } + + @Test + void admin_doesNotThrowException_whenServiceReturnsEmptyStatistik() { + // Arrange + Map emptyStatistik = new HashMap<>(); + when(werkstattService.getAdminStatistik()).thenReturn(emptyStatistik); + + // Act & Assert + assertThatCode(() -> adminController.admin(model)).doesNotThrowAnyException(); + } + + @Test + void bereinigen_doesNotThrowException_whenServiceReturnsEmptyStatistik() { + // Arrange + when(werkstattService.bereinigeStornierte()).thenReturn(0); + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act & Assert + assertThatCode(() -> adminController.bereinigen(model)).doesNotThrowAnyException(); + } + + @Test + void admin_callsGsonOnlyOnce() { + // Arrange + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act + adminController.admin(model); + + // Assert + verify(model, times(1)).addAttribute(eq("statistikJson"), any(String.class)); + } + + @Test + void bereinigen_callsGsonOnlyOnce() { + // Arrange + when(werkstattService.bereinigeStornierte()).thenReturn(0); + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act + adminController.bereinigen(model); + + // Assert + verify(model, times(1)).addAttribute(eq("statistikJson"), any(String.class)); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..4a2cedf --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/maven-test.log new file mode 100644 index 0000000..0cf4186 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/maven-test.log @@ -0,0 +1,190 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @78b729e6 (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-legacy >--------------- +[INFO] Building ai-testgen testbed — corpus A (legacy) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-legacy --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-legacy --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-legacy --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-legacy --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/../../../legacy/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 14 source files with javac [debug release 8] to target/classes +[WARNING] source value 8 is obsolete and will be removed in a future release +[WARNING] target value 8 is obsolete and will be removed in a future release +[WARNING] To suppress warnings about obsolete options, use -Xlint:-options. +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-legacy --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-legacy --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-legacy --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungGeneratedTest +[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.246 s -- in at.werkstatt.crm.gen.RechnungGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-legacy --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus A (legacy)' with 26 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-legacy --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:1.14.4 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/legacy/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:21:41 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:21:41 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:21:41 AM PIT >> INFO : Sending 1 test classes to minion +11:21:41 AM PIT >> INFO : Sent tests to minion +/-\|/-\|/-11:21:42 AM PIT >> INFO : Calculated coverage in 0 seconds. +11:21:42 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:21:42 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSmallNumericValues()]) took 84 ms +11:21:42 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testAllSettersAndGetters()]) covered 24 blocks +11:21:42 AM PIT >> INFO : Created 1 mutation test units +/11:21:43 AM PIT >> INFO : Completed in 1 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 5 Killed 5 (100%) +> KILLED 5 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : < 1 second +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 1 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSmallNumericValues()]) took 84 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testAllSettersAndGetters()]) covered 24 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 35/35 (100%) +>> 1 tests examined +>> Generated 12 mutations Killed 12 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 17 tests (1.42 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 7.457 s +[INFO] Finished at: 2026-08-02T11:21:43+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html new file mode 100644 index 0000000..3896b58 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html @@ -0,0 +1,1776 @@ + + + + + + + + + +

Rechnung.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.model;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.Date;
+ +4 + + + + + + +
+ +5 + + + + + + +
public class Rechnung {
+ +6 + + + + + + +
+ +7 + + + + + + +
	private Long id;
+ +8 + + + + + + +
	private String rechnungNr;
+ +9 + + + + + + +
	private Long auftragId;
+ +10 + + + + + + +
	private Date ausgestelltAm;
+ +11 + + + + + + +
	// Betraege als double, gerundet wird beim Erstellen (siehe WerkstattService)
+ +12 + + + + + + +
	private double summeNetto;
+ +13 + + + + + + +
	private double ust;
+ +14 + + + + + + +
	private double summeBrutto;
+ +15 + + + + + + +
	private boolean bezahlt;
+ +16 + + + + + + +
	private Date bezahltAm;
+ +17 + + + + + + +
+ +18 + + + + + + +
	// Anzeige
+ +19 + + + + + + +
	private String auftragNr;
+ +20 + + + + + + +
	private String kundeName;
+ +21 + + + + + + +
+ +22 + + + + + + +
	public Rechnung() {
+ +23 + + + + + + +
	}
+ +24 + + + + + + +
+ +25 + + + + + + +
	public Long getId() {
+ +26 + + +1 + +1. getId : replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId → KILLED
+ +
+
+
		return id;
+ +27 + + + + + + +
	}
+ +28 + + + + + + +
+ +29 + + + + + + +
	public void setId(Long id) {
+ +30 + + + + + + +
		this.id = id;
+ +31 + + + + + + +
	}
+ +32 + + + + + + +
+ +33 + + + + + + +
	public String getRechnungNr() {
+ +34 + + +1 + +1. getRechnungNr : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr → KILLED
+ +
+
+
		return rechnungNr;
+ +35 + + + + + + +
	}
+ +36 + + + + + + +
+ +37 + + + + + + +
	public void setRechnungNr(String rechnungNr) {
+ +38 + + + + + + +
		this.rechnungNr = rechnungNr;
+ +39 + + + + + + +
	}
+ +40 + + + + + + +
+ +41 + + + + + + +
	public Long getAuftragId() {
+ +42 + + +1 + +1. getAuftragId : replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId → KILLED
+ +
+
+
		return auftragId;
+ +43 + + + + + + +
	}
+ +44 + + + + + + +
+ +45 + + + + + + +
	public void setAuftragId(Long auftragId) {
+ +46 + + + + + + +
		this.auftragId = auftragId;
+ +47 + + + + + + +
	}
+ +48 + + + + + + +
+ +49 + + + + + + +
	public Date getAusgestelltAm() {
+ +50 + + +1 + +1. getAusgestelltAm : replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm → KILLED
+ +
+
+
		return ausgestelltAm;
+ +51 + + + + + + +
	}
+ +52 + + + + + + +
+ +53 + + + + + + +
	public void setAusgestelltAm(Date ausgestelltAm) {
+ +54 + + + + + + +
		this.ausgestelltAm = ausgestelltAm;
+ +55 + + + + + + +
	}
+ +56 + + + + + + +
+ +57 + + + + + + +
	public double getSummeNetto() {
+ +58 + + +1 + +1. getSummeNetto : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto → KILLED
+ +
+
+
		return summeNetto;
+ +59 + + + + + + +
	}
+ +60 + + + + + + +
+ +61 + + + + + + +
	public void setSummeNetto(double summeNetto) {
+ +62 + + + + + + +
		this.summeNetto = summeNetto;
+ +63 + + + + + + +
	}
+ +64 + + + + + + +
+ +65 + + + + + + +
	public double getUst() {
+ +66 + + +1 + +1. getUst : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst → KILLED
+ +
+
+
		return ust;
+ +67 + + + + + + +
	}
+ +68 + + + + + + +
+ +69 + + + + + + +
	public void setUst(double ust) {
+ +70 + + + + + + +
		this.ust = ust;
+ +71 + + + + + + +
	}
+ +72 + + + + + + +
+ +73 + + + + + + +
	public double getSummeBrutto() {
+ +74 + + +1 + +1. getSummeBrutto : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto → KILLED
+ +
+
+
		return summeBrutto;
+ +75 + + + + + + +
	}
+ +76 + + + + + + +
+ +77 + + + + + + +
	public void setSummeBrutto(double summeBrutto) {
+ +78 + + + + + + +
		this.summeBrutto = summeBrutto;
+ +79 + + + + + + +
	}
+ +80 + + + + + + +
+ +81 + + + + + + +
	public boolean isBezahlt() {
+ +82 + + +2 + +1. isBezahlt : replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED
+2. isBezahlt : replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED
+ +
+
+
		return bezahlt;
+ +83 + + + + + + +
	}
+ +84 + + + + + + +
+ +85 + + + + + + +
	public void setBezahlt(boolean bezahlt) {
+ +86 + + + + + + +
		this.bezahlt = bezahlt;
+ +87 + + + + + + +
	}
+ +88 + + + + + + +
+ +89 + + + + + + +
	public Date getBezahltAm() {
+ +90 + + +1 + +1. getBezahltAm : replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm → KILLED
+ +
+
+
		return bezahltAm;
+ +91 + + + + + + +
	}
+ +92 + + + + + + +
+ +93 + + + + + + +
	public void setBezahltAm(Date bezahltAm) {
+ +94 + + + + + + +
		this.bezahltAm = bezahltAm;
+ +95 + + + + + + +
	}
+ +96 + + + + + + +
+ +97 + + + + + + +
	public String getAuftragNr() {
+ +98 + + +1 + +1. getAuftragNr : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr → KILLED
+ +
+
+
		return auftragNr;
+ +99 + + + + + + +
	}
+ +100 + + + + + + +
+ +101 + + + + + + +
	public void setAuftragNr(String auftragNr) {
+ +102 + + + + + + +
		this.auftragNr = auftragNr;
+ +103 + + + + + + +
	}
+ +104 + + + + + + +
+ +105 + + + + + + +
	public String getKundeName() {
+ +106 + + +1 + +1. getKundeName : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName → KILLED
+ +
+
+
		return kundeName;
+ +107 + + + + + + +
	}
+ +108 + + + + + + +
+ +109 + + + + + + +
	public void setKundeName(String kundeName) {
+ +110 + + + + + + +
		this.kundeName = kundeName;
+ +111 + + + + + + +
	}
+ +112 + + + + + + +
+ +113 + + + + + + +
}

Mutations

26 + + + +

1.1
Location : getId
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testNegativeIds()]
replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId → KILLED + +

34 + + + +

1.1
Location : getRechnungNr
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr → KILLED + +

42 + + + +

1.1
Location : getAuftragId
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testNegativeIds()]
replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId → KILLED + +

50 + + + +

1.1
Location : getAusgestelltAm
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSameDateForAusgestelltAmAndBezahltAm()]
replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm → KILLED + +

58 + + + +

1.1
Location : getSummeNetto
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testLargeNumericValues()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto → KILLED + +

66 + + + +

1.1
Location : getUst
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testZeroAndNegativeAmounts()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst → KILLED + +

74 + + + +

1.1
Location : getSummeBrutto
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testZeroAndNegativeAmounts()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto → KILLED + +

82 + + + +

1.1
Location : isBezahlt
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testBezahltState()]
replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED +

2.2
Location : isBezahlt
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testBezahltState()]
replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED + +

90 + + + +

1.1
Location : getBezahltAm
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSameDateForAusgestelltAmAndBezahltAm()]
replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm → KILLED + +

98 + + + +

1.1
Location : getAuftragNr
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr → KILLED + +

106 + + + +

1.1
Location : getKundeName
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testZeroAndNegativeAmounts()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testLargeNumericValues()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testAllSettersAndGetters()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSmallNumericValues()] (84 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testNullDates()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSameDateForAusgestelltAmAndBezahltAm()] (2 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testBezahltState()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testEmptyAndWhitespaceStrings()] (2 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testNegativeIds()] (1 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html new file mode 100644 index 0000000..67ae756 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.model

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
35/35
100%
12/12
100%
12/12
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
Rechnung.java
100%
35/35
100%
12/12
100%
12/12
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..6f9edc6 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
35/35
100%
12/12
100%
12/12
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.model1
100%
35/35
100%
12/12
100%
12/12
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..ad77474 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,15 @@ + + +Rechnung.javaat.werkstatt.crm.model.RechnunggetAuftragId()Ljava/lang/Long;42org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testNegativeIds()]replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId +Rechnung.javaat.werkstatt.crm.model.RechnunggetAuftragNr()Ljava/lang/String;98org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr +Rechnung.javaat.werkstatt.crm.model.RechnunggetAusgestelltAm()Ljava/util/Date;50org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSameDateForAusgestelltAmAndBezahltAm()]replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm +Rechnung.javaat.werkstatt.crm.model.RechnunggetBezahltAm()Ljava/util/Date;90org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testSameDateForAusgestelltAmAndBezahltAm()]replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm +Rechnung.javaat.werkstatt.crm.model.RechnunggetId()Ljava/lang/Long;26org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testNegativeIds()]replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId +Rechnung.javaat.werkstatt.crm.model.RechnunggetKundeName()Ljava/lang/String;106org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName +Rechnung.javaat.werkstatt.crm.model.RechnunggetRechnungNr()Ljava/lang/String;34org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testDefaultConstructor()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr +Rechnung.javaat.werkstatt.crm.model.RechnunggetSummeBrutto()D74org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testZeroAndNegativeAmounts()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto +Rechnung.javaat.werkstatt.crm.model.RechnunggetSummeNetto()D58org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testLargeNumericValues()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto +Rechnung.javaat.werkstatt.crm.model.RechnunggetUst()D66org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testZeroAndNegativeAmounts()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst +Rechnung.javaat.werkstatt.crm.model.RechnungisBezahlt()Z82org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testBezahltState()]replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt +Rechnung.javaat.werkstatt.crm.model.RechnungisBezahlt()Z82org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:testBezahltState()]replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml new file mode 100644 index 0000000..3cb7ace --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt new file mode 100644 index 0000000..b73af1a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungGeneratedTest +------------------------------------------------------------------------------- +Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.246 s -- in at.werkstatt.crm.gen.RechnungGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/repaired/RechnungGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/repaired/RechnungGeneratedTest.java new file mode 100644 index 0000000..96d8999 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/A/s4-rechnung/repaired/RechnungGeneratedTest.java @@ -0,0 +1,182 @@ +package at.werkstatt.crm.gen; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.DisplayName; + +import at.werkstatt.crm.model.Rechnung; + +import java.util.Date; + +import static org.assertj.core.api.Assertions.assertThat; + +class RechnungGeneratedTest { + + @Test + @DisplayName("should create a new Rechnung with default values") + void testDefaultConstructor() { + Rechnung rechnung = new Rechnung(); + + assertThat(rechnung.getId()).isNull(); + assertThat(rechnung.getRechnungNr()).isNull(); + assertThat(rechnung.getAuftragId()).isNull(); + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(0.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(0.0); + assertThat(rechnung.isBezahlt()).isFalse(); + assertThat(rechnung.getBezahltAm()).isNull(); + assertThat(rechnung.getAuftragNr()).isNull(); + assertThat(rechnung.getKundeName()).isNull(); + } + + @Test + @DisplayName("should set and get all fields correctly") + void testAllSettersAndGetters() { + Rechnung rechnung = new Rechnung(); + + Long id = 123L; + String rechnungNr = "R2023-001"; + Long auftragId = 456L; + Date ausgestelltAm = new Date(); + double summeNetto = 100.0; + double ust = 20.0; + double summeBrutto = 120.0; + boolean bezahlt = true; + Date bezahltAm = new Date(); + String auftragNr = "A2023-001"; + String kundeName = "Max Mustermann"; + + rechnung.setId(id); + rechnung.setRechnungNr(rechnungNr); + rechnung.setAuftragId(auftragId); + rechnung.setAusgestelltAm(ausgestelltAm); + rechnung.setSummeNetto(summeNetto); + rechnung.setUst(ust); + rechnung.setSummeBrutto(summeBrutto); + rechnung.setBezahlt(bezahlt); + rechnung.setBezahltAm(bezahltAm); + rechnung.setAuftragNr(auftragNr); + rechnung.setKundeName(kundeName); + + assertThat(rechnung.getId()).isEqualTo(id); + assertThat(rechnung.getRechnungNr()).isEqualTo(rechnungNr); + assertThat(rechnung.getAuftragId()).isEqualTo(auftragId); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(ausgestelltAm); + assertThat(rechnung.getSummeNetto()).isEqualTo(summeNetto); + assertThat(rechnung.getUst()).isEqualTo(ust); + assertThat(rechnung.getSummeBrutto()).isEqualTo(summeBrutto); + assertThat(rechnung.isBezahlt()).isEqualTo(bezahlt); + assertThat(rechnung.getBezahltAm()).isEqualTo(bezahltAm); + assertThat(rechnung.getAuftragNr()).isEqualTo(auftragNr); + assertThat(rechnung.getKundeName()).isEqualTo(kundeName); + } + + @Test + @DisplayName("should handle zero and negative amounts correctly") + void testZeroAndNegativeAmounts() { + Rechnung rechnung = new Rechnung(); + + rechnung.setSummeNetto(0.0); + rechnung.setUst(-10.0); + rechnung.setSummeBrutto(-5.0); + + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(-10.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(-5.0); + } + + @Test + @DisplayName("should handle null dates correctly") + void testNullDates() { + Rechnung rechnung = new Rechnung(); + + rechnung.setAusgestelltAm(null); + rechnung.setBezahltAm(null); + + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getBezahltAm()).isNull(); + } + + @Test + @DisplayName("should handle empty and whitespace strings correctly") + void testEmptyAndWhitespaceStrings() { + Rechnung rechnung = new Rechnung(); + + rechnung.setRechnungNr(""); + rechnung.setAuftragNr(" "); + rechnung.setKundeName(null); + + assertThat(rechnung.getRechnungNr()).isEqualTo(""); + assertThat(rechnung.getAuftragNr()).isEqualTo(" "); + assertThat(rechnung.getKundeName()).isNull(); + } + + @Test + @DisplayName("should handle boolean bezahlt state correctly") + void testBezahltState() { + Rechnung rechnung = new Rechnung(); + + assertThat(rechnung.isBezahlt()).isFalse(); + + rechnung.setBezahlt(true); + assertThat(rechnung.isBezahlt()).isTrue(); + + rechnung.setBezahlt(false); + assertThat(rechnung.isBezahlt()).isFalse(); + } + + @Test + @DisplayName("should handle large numeric values correctly") + void testLargeNumericValues() { + Rechnung rechnung = new Rechnung(); + + double largeValue = 1_000_000.0; + rechnung.setSummeNetto(largeValue); + rechnung.setUst(largeValue); + rechnung.setSummeBrutto(largeValue); + + assertThat(rechnung.getSummeNetto()).isEqualTo(largeValue); + assertThat(rechnung.getUst()).isEqualTo(largeValue); + assertThat(rechnung.getSummeBrutto()).isEqualTo(largeValue); + } + + @Test + @DisplayName("should handle very small numeric values correctly") + void testSmallNumericValues() { + Rechnung rechnung = new Rechnung(); + + double smallValue = 0.001; + rechnung.setSummeNetto(smallValue); + rechnung.setUst(smallValue); + rechnung.setSummeBrutto(smallValue); + + assertThat(rechnung.getSummeNetto()).isEqualTo(smallValue); + assertThat(rechnung.getUst()).isEqualTo(smallValue); + assertThat(rechnung.getSummeBrutto()).isEqualTo(smallValue); + } + + @Test + @DisplayName("should allow setting same date for ausgestelltAm and bezahltAm") + void testSameDateForAusgestelltAmAndBezahltAm() { + Rechnung rechnung = new Rechnung(); + Date date = new Date(); + + rechnung.setAusgestelltAm(date); + rechnung.setBezahltAm(date); + + assertThat(rechnung.getAusgestelltAm()).isEqualTo(date); + assertThat(rechnung.getBezahltAm()).isEqualTo(date); + } + + @Test + @DisplayName("should handle negative IDs correctly") + void testNegativeIds() { + Rechnung rechnung = new Rechnung(); + + rechnung.setId(-1L); + rechnung.setAuftragId(-100L); + + assertThat(rechnung.getId()).isEqualTo(-1L); + assertThat(rechnung.getAuftragId()).isEqualTo(-100L); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/measurements-repaired.csv b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/measurements-repaired.csv new file mode 100644 index 0000000..74b1614 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/measurements-repaired.csv @@ -0,0 +1,7 @@ +unit,classUnderTest,compile,testsRun,failures,errors,lineCovered,lineMissed,branchCovered,branchMissed,mutationsGenerated,mutationsKilled +s1-werkstattservice,at.werkstatt.crm.service.WerkstattService,OK,40,0,0,236,50,54,20,111,49 +s2-auftragcontroller,at.werkstatt.crm.controller.AuftragController,OK,134,0,0,21,0,2,0,13,13 +s2-kundencontroller,at.werkstatt.crm.controller.KundenController,OK,14,0,0,21,0,6,0,17,17 +s2-rechnungcontroller,at.werkstatt.crm.controller.RechnungController,OK,9,0,0,14,0,2,0,8,8 +s3-admincontroller,at.werkstatt.crm.controller.AdminController,OK,6,0,0,15,0,0,0,2,2 +s4-rechnung,at.werkstatt.crm.model.Rechnung,OK,7,0,0,34,0,0,0,12,12 diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..13ca2f4 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/maven-test.log new file mode 100644 index 0000000..eca3884 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/maven-test.log @@ -0,0 +1,212 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @78dd667e (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java uses unchecked or unsafe operations. +[INFO] /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java: Recompile with -Xlint:unchecked for details. +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.WerkstattServiceGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +11:21:52.208 [main] INFO at.werkstatt.crm.service.WerkstattService -- Rechnung R-2026-0001 erstellt, brutto 120.0 +11:21:52.442 [main] WARN at.werkstatt.crm.service.WerkstattService -- Bereinigung: 2 stornierte Auftraege geloescht +11:21:52.460 [main] INFO at.werkstatt.crm.service.WerkstattService -- Auftrag A-2026-0006 angelegt fuer Fahrzeug 100 +11:21:52.483 [main] INFO at.werkstatt.crm.service.WerkstattService -- Auftrag A-2026-0006 angelegt fuer Fahrzeug 33 +11:21:52.520 [main] INFO at.werkstatt.crm.service.WerkstattService -- Auftrag null: FERTIG -> IN_ARBEIT +11:21:52.616 [main] INFO at.werkstatt.crm.service.WerkstattService -- Auftrag A-2025-0001: ANGENOMMEN -> IN_ARBEIT +11:21:52.620 [main] INFO at.werkstatt.crm.service.WerkstattService -- Kunde angelegt: MUSTERMANN, Max (id=42) +11:21:52.627 [main] INFO at.werkstatt.crm.service.WerkstattService -- Loesche Kunde 1 +11:21:52.650 [main] INFO at.werkstatt.crm.service.WerkstattService -- Auftrag null: IN_ARBEIT -> FERTIG +[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.273 s -- in at.werkstatt.crm.gen.WerkstattServiceGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:21:53 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:21:53 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:21:53 AM PIT >> INFO : Sending 1 test classes to minion +11:21:53 AM PIT >> INFO : Sent tests to minion +11:21:54 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|11:21:55 AM PIT >> INFO : Calculated coverage in 2 seconds. +11:21:55 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:21:55 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]) took 1053 ms +11:21:55 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]) covered 63 blocks +11:21:55 AM PIT >> INFO : Created 1 mutation test units +/11:22:02 AM PIT >> INFO : Completed in 8 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator +>> Generated 2 Killed 1 (50%) +> KILLED 1 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 37 Killed 5 (14%) +> KILLED 5 SURVIVED 3 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 29 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 14 Killed 10 (71%) +> KILLED 10 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 3 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.MathMutator +>> Generated 11 Killed 0 (0%) +> KILLED 0 SURVIVED 11 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 11 Killed 6 (55%) +> KILLED 6 SURVIVED 3 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 2 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 35 Killed 26 (74%) +> KILLED 26 SURVIVED 3 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 6 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 2 seconds +> build mutation tests : < 1 second +> run mutation analysis : 6 seconds +-------------------------------------------------------------------------------- +> Total : 8 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]) took 1053 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]) covered 63 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 236/286 (83%) +>> 1 tests examined +>> Generated 111 mutations Killed 49 (44%) +>> Mutations with no coverage 40. Test strength 69% +>> Ran 88 tests (0.79 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 17.340 s +[INFO] Finished at: 2026-08-02T11:22:02+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html new file mode 100644 index 0000000..a167709 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/WerkstattService.java.html @@ -0,0 +1,11673 @@ + + + + + + + + + +

WerkstattService.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.service;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Auftrag;
+ +4 + + + + + + +
import at.werkstatt.crm.model.AuftragPosition;
+ +5 + + + + + + +
import at.werkstatt.crm.model.Fahrzeug;
+ +6 + + + + + + +
import at.werkstatt.crm.model.Kunde;
+ +7 + + + + + + +
import at.werkstatt.crm.model.MonatsBericht;
+ +8 + + + + + + +
import at.werkstatt.crm.model.Rechnung;
+ +9 + + + + + + +
import java.sql.ResultSet;
+ +10 + + + + + + +
import java.sql.SQLException;
+ +11 + + + + + + +
import java.text.SimpleDateFormat;
+ +12 + + + + + + +
import java.util.Calendar;
+ +13 + + + + + + +
import java.util.Date;
+ +14 + + + + + + +
import java.util.HashMap;
+ +15 + + + + + + +
import java.util.List;
+ +16 + + + + + + +
import java.util.Map;
+ +17 + + + + + + +
import org.slf4j.Logger;
+ +18 + + + + + + +
import org.slf4j.LoggerFactory;
+ +19 + + + + + + +
import org.springframework.beans.factory.annotation.Value;
+ +20 + + + + + + +
import org.springframework.jdbc.core.JdbcTemplate;
+ +21 + + + + + + +
import org.springframework.jdbc.core.RowMapper;
+ +22 + + + + + + +
import org.springframework.stereotype.Service;
+ +23 + + + + + + +
+ +24 + + + + + + +
/**
+ +25 + + + + + + +
 * Zentrale Service-Klasse der Werkstatt. Hier ist ueber die Jahre alles zusammengewachsen: Kunden,
+ +26 + + + + + + +
 * Fahrzeuge, Auftraege, Rechnungen, Berichte.
+ +27 + + + + + + +
 *
+ +28 + + + + + + +
 * <p>ACHTUNG: Bitte nichts umbauen ohne Ruecksprache mit Hrn. B.! Die Rechnungslogik haengt am
+ +29 + + + + + + +
 * Statusfluss der Auftraege.
+ +30 + + + + + + +
 */
+ +31 + + + + + + +
@Service
+ +32 + + + + + + +
public class WerkstattService {
+ +33 + + + + + + +
+ +34 + + + + + + +
  private static final Logger LOG = LoggerFactory.getLogger(WerkstattService.class);
+ +35 + + + + + + +
+ +36 + + + + + + +
  // eine Instanz fuer alle Threads, hat bis jetzt eh immer funktioniert
+ +37 + + + + + + +
  private static final SimpleDateFormat DATUM = new SimpleDateFormat("dd.MM.yyyy");
+ +38 + + + + + + +
+ +39 + + + + + + +
  private final JdbcTemplate jdbcTemplate;
+ +40 + + + + + + +
  private final int ustSatz;
+ +41 + + + + + + +
+ +42 + + + + + + +
  public WerkstattService(
+ +43 + + + + + + +
      JdbcTemplate jdbcTemplate, @Value("${werkstatt.ust.satz:20}") int ustSatz) {
+ +44 + + + + + + +
    this.jdbcTemplate = jdbcTemplate;
+ +45 + + + + + + +
    this.ustSatz = ustSatz;
+ +46 + + + + + + +
  }
+ +47 + + + + + + +
+ +48 + + + + + + +
  // =====================================================================
+ +49 + + + + + + +
  // KUNDEN
+ +50 + + + + + + +
  // =====================================================================
+ +51 + + + + + + +
+ +52 + + + + + + +
  public List<Kunde> getAlleKunden() {
+ +53 + + + + + + +
    String sql = "SELECT * FROM kunde ORDER BY nachname, vorname";
+ +54 + + +1 + +1. getAlleKunden : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleKunden → KILLED
+ +
+
+
    return jdbcTemplate.query(
+ +55 + + + + + + +
        sql,
+ +56 + + + + + + +
        new RowMapper<Kunde>() {
+ +57 + + + + + + +
          public Kunde mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +58 + + + + + + +
            Kunde k = new Kunde();
+ +59 + + + + + + +
            k.setId(rs.getLong("id"));
+ +60 + + + + + + +
            k.setAnrede(rs.getString("anrede"));
+ +61 + + + + + + +
            k.setVorname(rs.getString("vorname"));
+ +62 + + + + + + +
            k.setNachname(rs.getString("nachname"));
+ +63 + + + + + + +
            k.setTelefon(rs.getString("telefon"));
+ +64 + + + + + + +
            k.setEmail(rs.getString("email"));
+ +65 + + + + + + +
            k.setStrasse(rs.getString("strasse"));
+ +66 + + + + + + +
            k.setPlz(rs.getString("plz"));
+ +67 + + + + + + +
            k.setOrt(rs.getString("ort"));
+ +68 + + + + + + +
            k.setNotiz(rs.getString("notiz"));
+ +69 + + + + + + +
            k.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +70 + + + + + + +
            return k;
+ +71 + + + + + + +
          }
+ +72 + + + + + + +
        });
+ +73 + + + + + + +
  }
+ +74 + + + + + + +
+ +75 + + + + + + +
  /**
+ +76 + + + + + + +
   * Kundensuche. Bis Etappe 4 war der Suchbegriff direkt ins SQL verkettet (LEGACY_NOTES B4) -
+ +77 + + + + + + +
   * jetzt parametrisiert, Verhalten fuer legitime Eingaben unveraendert (Golden Master gruen).
+ +78 + + + + + + +
   * Security-Story: Playbook Kap. 4.
+ +79 + + + + + + +
   */
+ +80 + + + + + + +
  public List<Kunde> sucheKunden(String suchbegriff) {
+ +81 + + + + + + +
    String muster = "%" + suchbegriff.toLowerCase() + "%";
+ +82 + + + + + + +
    String sql =
+ +83 + + + + + + +
        "SELECT * FROM kunde WHERE lower(nachname) LIKE ? OR lower(vorname) LIKE ? OR lower(ort) LIKE ? ORDER BY nachname";
+ +84 + + + + + + +
    LOG.debug("Kundensuche: " + suchbegriff);
+ +85 + + +1 + +1. sucheKunden : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::sucheKunden → KILLED
+ +
+
+
    return jdbcTemplate.query(
+ +86 + + + + + + +
        sql,
+ +87 + + + + + + +
        new RowMapper<Kunde>() {
+ +88 + + + + + + +
          public Kunde mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +89 + + + + + + +
            // Mapping nochmal, war schneller als umbauen
+ +90 + + + + + + +
            Kunde k = new Kunde();
+ +91 + + + + + + +
            k.setId(rs.getLong("id"));
+ +92 + + + + + + +
            k.setAnrede(rs.getString("anrede"));
+ +93 + + + + + + +
            k.setVorname(rs.getString("vorname"));
+ +94 + + + + + + +
            k.setNachname(rs.getString("nachname"));
+ +95 + + + + + + +
            k.setTelefon(rs.getString("telefon"));
+ +96 + + + + + + +
            k.setEmail(rs.getString("email"));
+ +97 + + + + + + +
            k.setStrasse(rs.getString("strasse"));
+ +98 + + + + + + +
            k.setPlz(rs.getString("plz"));
+ +99 + + + + + + +
            k.setOrt(rs.getString("ort"));
+ +100 + + + + + + +
            k.setNotiz(rs.getString("notiz"));
+ +101 + + + + + + +
            k.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +102 + + + + + + +
            return k;
+ +103 + + + + + + +
          }
+ +104 + + + + + + +
        },
+ +105 + + + + + + +
        muster,
+ +106 + + + + + + +
        muster,
+ +107 + + + + + + +
        muster);
+ +108 + + + + + + +
  }
+ +109 + + + + + + +
+ +110 + + + + + + +
  public Kunde getKunde(long id) {
+ +111 + + + + + + +
    List<Kunde> liste =
+ +112 + + + + + + +
        jdbcTemplate.query(
+ +113 + + + + + + +
            "SELECT * FROM kunde WHERE id = ?",
+ +114 + + + + + + +
            new RowMapper<Kunde>() {
+ +115 + + + + + + +
              public Kunde mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +116 + + + + + + +
                Kunde k = new Kunde();
+ +117 + + + + + + +
                k.setId(rs.getLong("id"));
+ +118 + + + + + + +
                k.setAnrede(rs.getString("anrede"));
+ +119 + + + + + + +
                k.setVorname(rs.getString("vorname"));
+ +120 + + + + + + +
                k.setNachname(rs.getString("nachname"));
+ +121 + + + + + + +
                k.setTelefon(rs.getString("telefon"));
+ +122 + + + + + + +
                k.setEmail(rs.getString("email"));
+ +123 + + + + + + +
                k.setStrasse(rs.getString("strasse"));
+ +124 + + + + + + +
                k.setPlz(rs.getString("plz"));
+ +125 + + + + + + +
                k.setOrt(rs.getString("ort"));
+ +126 + + + + + + +
                k.setNotiz(rs.getString("notiz"));
+ +127 + + + + + + +
                k.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +128 + + + + + + +
                return k;
+ +129 + + + + + + +
              }
+ +130 + + + + + + +
            },
+ +131 + + + + + + +
            id);
+ +132 + + +1 + +1. getKunde : negated conditional → KILLED
+ +
+
+
    if (liste.isEmpty()) {
+ +133 + + + + + + +
      return null;
+ +134 + + + + + + +
    }
+ +135 + + +1 + +1. getKunde : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getKunde → KILLED
+ +
+
+
    return liste.get(0);
+ +136 + + + + + + +
  }
+ +137 + + + + + + +
+ +138 + + + + + + +
  public Kunde speichereKunde(Kunde kunde) {
+ +139 + + +1 + +1. speichereKunde : negated conditional → KILLED
+ +
+
+
    if (kunde.getId() == null) {
+ +140 + + + + + + +
      Long neueId =
+ +141 + + + + + + +
          jdbcTemplate.queryForObject(
+ +142 + + + + + + +
              "INSERT INTO kunde (anrede, vorname, nachname, telefon, email, strasse, plz, ort, notiz, angelegt_am) "
+ +143 + + + + + + +
                  + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, now()) RETURNING id",
+ +144 + + + + + + +
              Long.class,
+ +145 + + + + + + +
              kunde.getAnrede(),
+ +146 + + + + + + +
              kunde.getVorname(),
+ +147 + + + + + + +
              kunde.getNachname(),
+ +148 + + + + + + +
              kunde.getTelefon(),
+ +149 + + + + + + +
              kunde.getEmail(),
+ +150 + + + + + + +
              kunde.getStrasse(),
+ +151 + + + + + + +
              kunde.getPlz(),
+ +152 + + + + + + +
              kunde.getOrt(),
+ +153 + + + + + + +
              kunde.getNotiz());
+ +154 + + +1 + +1. speichereKunde : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
      kunde.setId(neueId);
+ +155 + + + + + + +
      LOG.info("Kunde angelegt: " + kunde.getAnzeigeName() + " (id=" + neueId + ")");
+ +156 + + + + + + +
    } else {
+ +157 + + + + + + +
      jdbcTemplate.update(
+ +158 + + + + + + +
          "UPDATE kunde SET anrede=?, vorname=?, nachname=?, telefon=?, email=?, strasse=?, plz=?, ort=?, notiz=? WHERE id=?",
+ +159 + + + + + + +
          kunde.getAnrede(),
+ +160 + + + + + + +
          kunde.getVorname(),
+ +161 + + + + + + +
          kunde.getNachname(),
+ +162 + + + + + + +
          kunde.getTelefon(),
+ +163 + + + + + + +
          kunde.getEmail(),
+ +164 + + + + + + +
          kunde.getStrasse(),
+ +165 + + + + + + +
          kunde.getPlz(),
+ +166 + + + + + + +
          kunde.getOrt(),
+ +167 + + + + + + +
          kunde.getNotiz(),
+ +168 + + + + + + +
          kunde.getId());
+ +169 + + + + + + +
    }
+ +170 + + +1 + +1. speichereKunde : replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereKunde → KILLED
+ +
+
+
    return getKunde(kunde.getId());
+ +171 + + + + + + +
  }
+ +172 + + + + + + +
+ +173 + + + + + + +
  public void loescheKunde(long id) {
+ +174 + + + + + + +
    // Fahrzeuge und Auftraege bleiben stehen, hat noch nie Probleme gemacht
+ +175 + + + + + + +
    LOG.info("Loesche Kunde " + id);
+ +176 + + + + + + +
    jdbcTemplate.update("DELETE FROM kunde WHERE id = ?", id);
+ +177 + + + + + + +
  }
+ +178 + + + + + + +
+ +179 + + + + + + +
  // =====================================================================
+ +180 + + + + + + +
  // FAHRZEUGE
+ +181 + + + + + + +
  // =====================================================================
+ +182 + + + + + + +
+ +183 + + + + + + +
  public List<Fahrzeug> getAlleFahrzeuge() {
+ +184 + + + + + + +
    String sql =
+ +185 + + + + + + +
        "SELECT f.*, k.nachname, k.vorname FROM fahrzeug f LEFT JOIN kunde k ON k.id = f.kunde_id ORDER BY f.kennzeichen";
+ +186 + + +1 + +1. getAlleFahrzeuge : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleFahrzeuge → SURVIVED
+ +
+
+
    return jdbcTemplate.query(
+ +187 + + + + + + +
        sql,
+ +188 + + + + + + +
        new RowMapper<Fahrzeug>() {
+ +189 + + + + + + +
          public Fahrzeug mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +190 + + + + + + +
            Fahrzeug f = mapFahrzeug(rs);
+ +191 + + + + + + +
            String nn = rs.getString("nachname");
+ +192 + + + + + + +
            String vn = rs.getString("vorname");
+ +193 + + + + + + +
            if (nn != null) {
+ +194 + + + + + + +
              f.setKundeName(nn + " " + (vn == null ? "" : vn));
+ +195 + + + + + + +
            }
+ +196 + + + + + + +
            return f;
+ +197 + + + + + + +
          }
+ +198 + + + + + + +
        });
+ +199 + + + + + + +
  }
+ +200 + + + + + + +
+ +201 + + + + + + +
  public List<Fahrzeug> getFahrzeugeZuKunde(long kundeId) {
+ +202 + + +1 + +1. getFahrzeugeZuKunde : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getFahrzeugeZuKunde → SURVIVED
+ +
+
+
    return jdbcTemplate.query(
+ +203 + + + + + + +
        "SELECT * FROM fahrzeug WHERE kunde_id = ? ORDER BY kennzeichen",
+ +204 + + + + + + +
        new RowMapper<Fahrzeug>() {
+ +205 + + + + + + +
          public Fahrzeug mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +206 + + + + + + +
            return mapFahrzeug(rs);
+ +207 + + + + + + +
          }
+ +208 + + + + + + +
        },
+ +209 + + + + + + +
        kundeId);
+ +210 + + + + + + +
  }
+ +211 + + + + + + +
+ +212 + + + + + + +
  public Fahrzeug getFahrzeug(long id) {
+ +213 + + + + + + +
    List<Fahrzeug> liste =
+ +214 + + + + + + +
        jdbcTemplate.query(
+ +215 + + + + + + +
            "SELECT * FROM fahrzeug WHERE id = ?",
+ +216 + + + + + + +
            new RowMapper<Fahrzeug>() {
+ +217 + + + + + + +
              public Fahrzeug mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +218 + + + + + + +
                return mapFahrzeug(rs);
+ +219 + + + + + + +
              }
+ +220 + + + + + + +
            },
+ +221 + + + + + + +
            id);
+ +222 + + +2 + +1. getFahrzeug : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getFahrzeug → KILLED
+2. getFahrzeug : negated conditional → KILLED
+ +
+
+
    return liste.isEmpty() ? null : liste.get(0);
+ +223 + + + + + + +
  }
+ +224 + + + + + + +
+ +225 + + + + + + +
  // die eine Stelle, an der das Mapping ausgelagert wurde (2018, Hr. F.)
+ +226 + + + + + + +
  private Fahrzeug mapFahrzeug(ResultSet rs) throws SQLException {
+ +227 + + + + + + +
    Fahrzeug f = new Fahrzeug();
+ +228 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setId → NO_COVERAGE
+ +
+
+
    f.setId(rs.getLong("id"));
+ +229 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setKundeId → NO_COVERAGE
+ +
+
+
    f.setKundeId(rs.getLong("kunde_id"));
+ +230 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setKennzeichen → NO_COVERAGE
+ +
+
+
    f.setKennzeichen(rs.getString("kennzeichen"));
+ +231 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setMarke → NO_COVERAGE
+ +
+
+
    f.setMarke(rs.getString("marke"));
+ +232 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setModell → NO_COVERAGE
+ +
+
+
    f.setModell(rs.getString("modell"));
+ +233 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setFahrgestellnr → NO_COVERAGE
+ +
+
+
    f.setFahrgestellnr(rs.getString("fahrgestellnr"));
+ +234 + + + + + + +
    int bj = rs.getInt("baujahr");
+ +235 + + +1 + +1. mapFahrzeug : negated conditional → NO_COVERAGE
+ +
+
+
    if (!rs.wasNull()) {
+ +236 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setBaujahr → NO_COVERAGE
+ +
+
+
      f.setBaujahr(bj);
+ +237 + + + + + + +
    }
+ +238 + + + + + + +
    int km = rs.getInt("km_stand");
+ +239 + + +1 + +1. mapFahrzeug : negated conditional → NO_COVERAGE
+ +
+
+
    if (!rs.wasNull()) {
+ +240 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setKmStand → NO_COVERAGE
+ +
+
+
      f.setKmStand(km);
+ +241 + + + + + + +
    }
+ +242 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setPickerlDatum → NO_COVERAGE
+ +
+
+
    f.setPickerlDatum(rs.getDate("pickerl_datum"));
+ +243 + + +1 + +1. mapFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setAngelegtAm → NO_COVERAGE
+ +
+
+
    f.setAngelegtAm(rs.getTimestamp("angelegt_am"));
+ +244 + + +1 + +1. mapFahrzeug : replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapFahrzeug → NO_COVERAGE
+ +
+
+
    return f;
+ +245 + + + + + + +
  }
+ +246 + + + + + + +
+ +247 + + + + + + +
  public Fahrzeug speichereFahrzeug(Fahrzeug fahrzeug) {
+ +248 + + +1 + +1. speichereFahrzeug : negated conditional → KILLED
+ +
+
+
    if (fahrzeug.getId() == null) {
+ +249 + + + + + + +
      Long neueId =
+ +250 + + + + + + +
          jdbcTemplate.queryForObject(
+ +251 + + + + + + +
              "INSERT INTO fahrzeug (kunde_id, kennzeichen, marke, modell, fahrgestellnr, baujahr, km_stand, pickerl_datum, angelegt_am) "
+ +252 + + + + + + +
                  + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, now()) RETURNING id",
+ +253 + + + + + + +
              Long.class,
+ +254 + + + + + + +
              fahrzeug.getKundeId(),
+ +255 + + + + + + +
              fahrzeug.getKennzeichen(),
+ +256 + + + + + + +
              fahrzeug.getMarke(),
+ +257 + + + + + + +
              fahrzeug.getModell(),
+ +258 + + + + + + +
              fahrzeug.getFahrgestellnr(),
+ +259 + + + + + + +
              fahrzeug.getBaujahr(),
+ +260 + + + + + + +
              fahrzeug.getKmStand(),
+ +261 + + + + + + +
              fahrzeug.getPickerlDatum());
+ +262 + + +1 + +1. speichereFahrzeug : removed call to at/werkstatt/crm/model/Fahrzeug::setId → KILLED
+ +
+
+
      fahrzeug.setId(neueId);
+ +263 + + + + + + +
    } else {
+ +264 + + + + + + +
      jdbcTemplate.update(
+ +265 + + + + + + +
          "UPDATE fahrzeug SET kunde_id=?, kennzeichen=?, marke=?, modell=?, fahrgestellnr=?, baujahr=?, km_stand=?, pickerl_datum=? WHERE id=?",
+ +266 + + + + + + +
          fahrzeug.getKundeId(),
+ +267 + + + + + + +
          fahrzeug.getKennzeichen(),
+ +268 + + + + + + +
          fahrzeug.getMarke(),
+ +269 + + + + + + +
          fahrzeug.getModell(),
+ +270 + + + + + + +
          fahrzeug.getFahrgestellnr(),
+ +271 + + + + + + +
          fahrzeug.getBaujahr(),
+ +272 + + + + + + +
          fahrzeug.getKmStand(),
+ +273 + + + + + + +
          fahrzeug.getPickerlDatum(),
+ +274 + + + + + + +
          fahrzeug.getId());
+ +275 + + + + + + +
    }
+ +276 + + +1 + +1. speichereFahrzeug : replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereFahrzeug → KILLED
+ +
+
+
    return getFahrzeug(fahrzeug.getId());
+ +277 + + + + + + +
  }
+ +278 + + + + + + +
+ +279 + + + + + + +
  public void loescheFahrzeug(long id) {
+ +280 + + + + + + +
    jdbcTemplate.update("DELETE FROM fahrzeug WHERE id = ?", id);
+ +281 + + + + + + +
  }
+ +282 + + + + + + +
+ +283 + + + + + + +
  // =====================================================================
+ +284 + + + + + + +
  // AUFTRAEGE
+ +285 + + + + + + +
  // =====================================================================
+ +286 + + + + + + +
+ +287 + + + + + + +
  public List<Auftrag> getAuftraege(String status) {
+ +288 + + + + + + +
    String sql =
+ +289 + + + + + + +
        "SELECT a.*, k.nachname, k.vorname, f.kennzeichen, f.marke, f.modell "
+ +290 + + + + + + +
            + "FROM auftrag a LEFT JOIN kunde k ON k.id = a.kunde_id LEFT JOIN fahrzeug f ON f.id = a.fahrzeug_id";
+ +291 + + +3 + +1. getAuftraege : changed conditional boundary → SURVIVED
+2. getAuftraege : negated conditional → KILLED
+3. getAuftraege : negated conditional → KILLED
+ +
+
+
    boolean mitStatus = status != null && status.length() > 0;
+ +292 + + +1 + +1. getAuftraege : negated conditional → SURVIVED
+ +
+
+
    if (mitStatus) {
+ +293 + + + + + + +
      sql = sql + " WHERE a.status = ?";
+ +294 + + + + + + +
    }
+ +295 + + + + + + +
    sql = sql + " ORDER BY a.angenommen_am DESC";
+ +296 + + +1 + +1. getAuftraege : negated conditional → KILLED
+ +
+
+
    Object[] parameter = mitStatus ? new Object[] {status} : new Object[0];
+ +297 + + +1 + +1. getAuftraege : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAuftraege → KILLED
+ +
+
+
    return jdbcTemplate.query(
+ +298 + + + + + + +
        sql,
+ +299 + + + + + + +
        new RowMapper<Auftrag>() {
+ +300 + + + + + + +
          public Auftrag mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +301 + + + + + + +
            Auftrag a = mapAuftrag(rs);
+ +302 + + + + + + +
            String nn = rs.getString("nachname");
+ +303 + + + + + + +
            if (nn != null) {
+ +304 + + + + + + +
              a.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +305 + + + + + + +
            }
+ +306 + + + + + + +
            a.setKennzeichen(rs.getString("kennzeichen"));
+ +307 + + + + + + +
            a.setFahrzeugBezeichnung(
+ +308 + + + + + + +
                defaultString(rs.getString("marke")) + " " + defaultString(rs.getString("modell")));
+ +309 + + + + + + +
            return a;
+ +310 + + + + + + +
          }
+ +311 + + + + + + +
        },
+ +312 + + + + + + +
        parameter);
+ +313 + + + + + + +
  }
+ +314 + + + + + + +
+ +315 + + + + + + +
  public Auftrag getAuftrag(long id) {
+ +316 + + + + + + +
    String sql =
+ +317 + + + + + + +
        "SELECT a.*, k.nachname, k.vorname, f.kennzeichen, f.marke, f.modell "
+ +318 + + + + + + +
            + "FROM auftrag a LEFT JOIN kunde k ON k.id = a.kunde_id LEFT JOIN fahrzeug f ON f.id = a.fahrzeug_id "
+ +319 + + + + + + +
            + "WHERE a.id = ?";
+ +320 + + + + + + +
    List<Auftrag> liste =
+ +321 + + + + + + +
        jdbcTemplate.query(
+ +322 + + + + + + +
            sql,
+ +323 + + + + + + +
            new RowMapper<Auftrag>() {
+ +324 + + + + + + +
              public Auftrag mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +325 + + + + + + +
                Auftrag a = mapAuftrag(rs);
+ +326 + + + + + + +
                String nn = rs.getString("nachname");
+ +327 + + + + + + +
                if (nn != null) {
+ +328 + + + + + + +
                  a.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +329 + + + + + + +
                }
+ +330 + + + + + + +
                a.setKennzeichen(rs.getString("kennzeichen"));
+ +331 + + + + + + +
                a.setFahrzeugBezeichnung(
+ +332 + + + + + + +
                    defaultString(rs.getString("marke"))
+ +333 + + + + + + +
                        + " "
+ +334 + + + + + + +
                        + defaultString(rs.getString("modell")));
+ +335 + + + + + + +
                return a;
+ +336 + + + + + + +
              }
+ +337 + + + + + + +
            },
+ +338 + + + + + + +
            id);
+ +339 + + +1 + +1. getAuftrag : negated conditional → KILLED
+ +
+
+
    if (liste.isEmpty()) {
+ +340 + + + + + + +
      return null;
+ +341 + + + + + + +
    }
+ +342 + + + + + + +
    Auftrag auftrag = liste.get(0);
+ +343 + + +1 + +1. getAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setPositionen → KILLED
+ +
+
+
    auftrag.setPositionen(getPositionen(id));
+ +344 + + +1 + +1. getAuftrag : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getAuftrag → KILLED
+ +
+
+
    return auftrag;
+ +345 + + + + + + +
  }
+ +346 + + + + + + +
+ +347 + + + + + + +
  private Auftrag mapAuftrag(ResultSet rs) throws SQLException {
+ +348 + + + + + + +
    Auftrag a = new Auftrag();
+ +349 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setId → NO_COVERAGE
+ +
+
+
    a.setId(rs.getLong("id"));
+ +350 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → NO_COVERAGE
+ +
+
+
    a.setAuftragNr(rs.getString("auftrag_nr"));
+ +351 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setFahrzeugId → NO_COVERAGE
+ +
+
+
    a.setFahrzeugId(rs.getLong("fahrzeug_id"));
+ +352 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setKundeId → NO_COVERAGE
+ +
+
+
    a.setKundeId(rs.getLong("kunde_id"));
+ +353 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setStatus → NO_COVERAGE
+ +
+
+
    a.setStatus(rs.getString("status"));
+ +354 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setBeschreibung → NO_COVERAGE
+ +
+
+
    a.setBeschreibung(rs.getString("beschreibung"));
+ +355 + + + + + + +
    int km = rs.getInt("km_stand");
+ +356 + + +1 + +1. mapAuftrag : negated conditional → NO_COVERAGE
+ +
+
+
    if (!rs.wasNull()) {
+ +357 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setKmStand → NO_COVERAGE
+ +
+
+
      a.setKmStand(km);
+ +358 + + + + + + +
    }
+ +359 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAngenommenAm → NO_COVERAGE
+ +
+
+
    a.setAngenommenAm(rs.getTimestamp("angenommen_am"));
+ +360 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setFertigAm → NO_COVERAGE
+ +
+
+
    a.setFertigAm(rs.getTimestamp("fertig_am"));
+ +361 + + +1 + +1. mapAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAbgeholtAm → NO_COVERAGE
+ +
+
+
    a.setAbgeholtAm(rs.getTimestamp("abgeholt_am"));
+ +362 + + +1 + +1. mapAuftrag : replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapAuftrag → NO_COVERAGE
+ +
+
+
    return a;
+ +363 + + + + + + +
  }
+ +364 + + + + + + +
+ +365 + + + + + + +
  public List<AuftragPosition> getPositionen(long auftragId) {
+ +366 + + +1 + +1. getPositionen : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getPositionen → KILLED
+ +
+
+
    return jdbcTemplate.query(
+ +367 + + + + + + +
        "SELECT * FROM auftrag_position WHERE auftrag_id = ? ORDER BY id",
+ +368 + + + + + + +
        new RowMapper<AuftragPosition>() {
+ +369 + + + + + + +
          public AuftragPosition mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +370 + + + + + + +
            AuftragPosition p = new AuftragPosition();
+ +371 + + + + + + +
            p.setId(rs.getLong("id"));
+ +372 + + + + + + +
            p.setAuftragId(rs.getLong("auftrag_id"));
+ +373 + + + + + + +
            p.setTyp(rs.getString("typ"));
+ +374 + + + + + + +
            p.setBezeichnung(rs.getString("bezeichnung"));
+ +375 + + + + + + +
            p.setMenge(rs.getDouble("menge"));
+ +376 + + + + + + +
            p.setEinzelpreis(rs.getDouble("einzelpreis"));
+ +377 + + + + + + +
            return p;
+ +378 + + + + + + +
          }
+ +379 + + + + + + +
        },
+ +380 + + + + + + +
        auftragId);
+ +381 + + + + + + +
  }
+ +382 + + + + + + +
+ +383 + + + + + + +
  /**
+ +384 + + + + + + +
   * Neuen Auftrag anlegen. Nummer wird aus MAX+1 gebaut - bei zwei gleichzeitigen Annahmen knallt
+ +385 + + + + + + +
   * es theoretisch, ist aber bei uns noch nie passiert (eine Annahme-Theke).
+ +386 + + + + + + +
   */
+ +387 + + + + + + +
  public Auftrag neuerAuftrag(Auftrag auftrag) {
+ +388 + + + + + + +
    int jahr = Calendar.getInstance().get(Calendar.YEAR);
+ +389 + + + + + + +
    Integer max =
+ +390 + + + + + + +
        jdbcTemplate.queryForObject(
+ +391 + + + + + + +
            "SELECT COALESCE(MAX(CAST(SUBSTRING(auftrag_nr FROM 8) AS INTEGER)), 0) FROM auftrag WHERE auftrag_nr LIKE ?",
+ +392 + + + + + + +
            Integer.class,
+ +393 + + + + + + +
            "A-" + jahr + "-%");
+ +394 + + +1 + +1. neuerAuftrag : Replaced integer addition with subtraction → SURVIVED
+ +
+
+
    String nr = "A-" + jahr + "-" + String.format("%04d", max + 1);
+ +395 + + +1 + +1. neuerAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → SURVIVED
+ +
+
+
    auftrag.setAuftragNr(nr);
+ +396 + + +1 + +1. neuerAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setStatus → SURVIVED
+ +
+
+
    auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN);
+ +397 + + + + + + +
+ +398 + + + + + + +
    Long neueId =
+ +399 + + + + + + +
        jdbcTemplate.queryForObject(
+ +400 + + + + + + +
            "INSERT INTO auftrag (auftrag_nr, fahrzeug_id, kunde_id, status, beschreibung, km_stand, angenommen_am) "
+ +401 + + + + + + +
                + "VALUES (?, ?, ?, ?, ?, ?, now()) RETURNING id",
+ +402 + + + + + + +
            Long.class,
+ +403 + + + + + + +
            nr,
+ +404 + + + + + + +
            auftrag.getFahrzeugId(),
+ +405 + + + + + + +
            auftrag.getKundeId(),
+ +406 + + + + + + +
            auftrag.getStatus(),
+ +407 + + + + + + +
            auftrag.getBeschreibung(),
+ +408 + + + + + + +
            auftrag.getKmStand());
+ +409 + + +1 + +1. neuerAuftrag : removed call to at/werkstatt/crm/model/Auftrag::setId → SURVIVED
+ +
+
+
    auftrag.setId(neueId);
+ +410 + + + + + + +
+ +411 + + + + + + +
    // km-Stand gleich am Fahrzeug mitziehen (ohne Transaktion, siehe Notizen)
+ +412 + + +1 + +1. neuerAuftrag : negated conditional → KILLED
+ +
+
+
    if (auftrag.getKmStand() != null) {
+ +413 + + + + + + +
      jdbcTemplate.update(
+ +414 + + + + + + +
          "UPDATE fahrzeug SET km_stand = ? WHERE id = ?",
+ +415 + + + + + + +
          auftrag.getKmStand(),
+ +416 + + + + + + +
          auftrag.getFahrzeugId());
+ +417 + + + + + + +
    }
+ +418 + + + + + + +
+ +419 + + + + + + +
    LOG.info("Auftrag " + nr + " angelegt fuer Fahrzeug " + auftrag.getFahrzeugId());
+ +420 + + +1 + +1. neuerAuftrag : replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuerAuftrag → KILLED
+ +
+
+
    return getAuftrag(neueId);
+ +421 + + + + + + +
  }
+ +422 + + + + + + +
+ +423 + + + + + + +
  /**
+ +424 + + + + + + +
   * Statuswechsel mit den erlaubten Uebergaengen. Die Regeln stehen so auch im Werkstatt-Ordner bei
+ +425 + + + + + + +
   * der Annahme-Theke.
+ +426 + + + + + + +
   */
+ +427 + + + + + + +
  public Auftrag setzeStatus(long auftragId, String neuerStatus) {
+ +428 + + + + + + +
    Auftrag auftrag = getAuftrag(auftragId);
+ +429 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
    if (auftrag == null) {
+ +430 + + + + + + +
      throw new RuntimeException("Auftrag " + auftragId + " nicht gefunden");
+ +431 + + + + + + +
    }
+ +432 + + + + + + +
    String alt = auftrag.getStatus();
+ +433 + + + + + + +
+ +434 + + + + + + +
    boolean erlaubt = false;
+ +435 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
    if (alt.equals(Auftrag.STATUS_ANGENOMMEN)) {
+ +436 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
      if (neuerStatus.equals(Auftrag.STATUS_IN_ARBEIT)
+ +437 + + +1 + +1. setzeStatus : negated conditional → NO_COVERAGE
+ +
+
+
          || neuerStatus.equals(Auftrag.STATUS_STORNIERT)) {
+ +438 + + + + + + +
        erlaubt = true;
+ +439 + + + + + + +
      }
+ +440 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
    } else if (alt.equals(Auftrag.STATUS_IN_ARBEIT)) {
+ +441 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
      if (neuerStatus.equals(Auftrag.STATUS_FERTIG)
+ +442 + + +1 + +1. setzeStatus : negated conditional → NO_COVERAGE
+ +
+
+
          || neuerStatus.equals(Auftrag.STATUS_STORNIERT)) {
+ +443 + + + + + + +
        erlaubt = true;
+ +444 + + + + + + +
      }
+ +445 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
    } else if (alt.equals(Auftrag.STATUS_FERTIG)) {
+ +446 + + +1 + +1. setzeStatus : negated conditional → SURVIVED
+ +
+
+
      if (neuerStatus.equals(Auftrag.STATUS_ABGEHOLT)) {
+ +447 + + + + + + +
        erlaubt = true;
+ +448 + + + + + + +
      }
+ +449 + + + + + + +
      // Sonderfall: doch noch was gefunden -> zurueck in Arbeit
+ +450 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
      if (neuerStatus.equals(Auftrag.STATUS_IN_ARBEIT)) {
+ +451 + + + + + + +
        erlaubt = true;
+ +452 + + + + + + +
      }
+ +453 + + + + + + +
    }
+ +454 + + + + + + +
+ +455 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
    if (!erlaubt) {
+ +456 + + + + + + +
      throw new RuntimeException(
+ +457 + + + + + + +
          "Statuswechsel " + alt + " -> " + neuerStatus + " ist nicht erlaubt");
+ +458 + + + + + + +
    }
+ +459 + + + + + + +
+ +460 + + + + + + +
    String sql = "UPDATE auftrag SET status = ?";
+ +461 + + +1 + +1. setzeStatus : negated conditional → KILLED
+ +
+
+
    if (neuerStatus.equals(Auftrag.STATUS_FERTIG)) {
+ +462 + + + + + + +
      sql = sql + ", fertig_am = now()";
+ +463 + + + + + + +
    }
+ +464 + + +1 + +1. setzeStatus : negated conditional → SURVIVED
+ +
+
+
    if (neuerStatus.equals(Auftrag.STATUS_ABGEHOLT)) {
+ +465 + + + + + + +
      sql = sql + ", abgeholt_am = now()";
+ +466 + + + + + + +
    }
+ +467 + + + + + + +
    sql = sql + " WHERE id = ?";
+ +468 + + + + + + +
    jdbcTemplate.update(sql, neuerStatus, auftragId);
+ +469 + + + + + + +
+ +470 + + + + + + +
    LOG.info("Auftrag " + auftrag.getAuftragNr() + ": " + alt + " -> " + neuerStatus);
+ +471 + + +1 + +1. setzeStatus : replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeStatus → KILLED
+ +
+
+
    return getAuftrag(auftragId);
+ +472 + + + + + + +
  }
+ +473 + + + + + + +
+ +474 + + + + + + +
  public AuftragPosition neuePosition(long auftragId, AuftragPosition position) {
+ +475 + + + + + + +
    Auftrag auftrag = getAuftrag(auftragId);
+ +476 + + +1 + +1. neuePosition : negated conditional → KILLED
+ +
+
+
    if (auftrag == null) {
+ +477 + + + + + + +
      throw new RuntimeException("Auftrag " + auftragId + " nicht gefunden");
+ +478 + + + + + + +
    }
+ +479 + + +1 + +1. neuePosition : negated conditional → KILLED
+ +
+
+
    if (auftrag.getStatus().equals(Auftrag.STATUS_ABGEHOLT)
+ +480 + + +1 + +1. neuePosition : negated conditional → KILLED
+ +
+
+
        || auftrag.getStatus().equals(Auftrag.STATUS_STORNIERT)) {
+ +481 + + + + + + +
      throw new RuntimeException(
+ +482 + + + + + + +
          "Auftrag "
+ +483 + + + + + + +
              + auftrag.getAuftragNr()
+ +484 + + + + + + +
              + " ist abgeschlossen, keine Positionen mehr moeglich");
+ +485 + + + + + + +
    }
+ +486 + + + + + + +
    Long neueId =
+ +487 + + + + + + +
        jdbcTemplate.queryForObject(
+ +488 + + + + + + +
            "INSERT INTO auftrag_position (auftrag_id, typ, bezeichnung, menge, einzelpreis) VALUES (?, ?, ?, ?, ?) RETURNING id",
+ +489 + + + + + + +
            Long.class,
+ +490 + + + + + + +
            auftragId,
+ +491 + + + + + + +
            position.getTyp(),
+ +492 + + + + + + +
            position.getBezeichnung(),
+ +493 + + + + + + +
            position.getMenge(),
+ +494 + + + + + + +
            position.getEinzelpreis());
+ +495 + + +1 + +1. neuePosition : removed call to at/werkstatt/crm/model/AuftragPosition::setId → KILLED
+ +
+
+
    position.setId(neueId);
+ +496 + + +1 + +1. neuePosition : removed call to at/werkstatt/crm/model/AuftragPosition::setAuftragId → KILLED
+ +
+
+
    position.setAuftragId(auftragId);
+ +497 + + +1 + +1. neuePosition : replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuePosition → KILLED
+ +
+
+
    return position;
+ +498 + + + + + + +
  }
+ +499 + + + + + + +
+ +500 + + + + + + +
  public void loeschePosition(long positionId) {
+ +501 + + + + + + +
    jdbcTemplate.update("DELETE FROM auftrag_position WHERE id = ?", positionId);
+ +502 + + + + + + +
  }
+ +503 + + + + + + +
+ +504 + + + + + + +
  // =====================================================================
+ +505 + + + + + + +
  // RECHNUNGEN
+ +506 + + + + + + +
  // =====================================================================
+ +507 + + + + + + +
+ +508 + + + + + + +
  public List<Rechnung> getAlleRechnungen() {
+ +509 + + + + + + +
    String sql =
+ +510 + + + + + + +
        "SELECT r.*, a.auftrag_nr, k.nachname, k.vorname FROM rechnung r "
+ +511 + + + + + + +
            + "LEFT JOIN auftrag a ON a.id = r.auftrag_id LEFT JOIN kunde k ON k.id = a.kunde_id "
+ +512 + + + + + + +
            + "ORDER BY r.ausgestellt_am DESC, r.id DESC";
+ +513 + + +1 + +1. getAlleRechnungen : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleRechnungen → NO_COVERAGE
+ +
+
+
    return jdbcTemplate.query(
+ +514 + + + + + + +
        sql,
+ +515 + + + + + + +
        new RowMapper<Rechnung>() {
+ +516 + + + + + + +
          public Rechnung mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +517 + + + + + + +
            Rechnung r = mapRechnung(rs);
+ +518 + + + + + + +
            r.setAuftragNr(rs.getString("auftrag_nr"));
+ +519 + + + + + + +
            String nn = rs.getString("nachname");
+ +520 + + + + + + +
            if (nn != null) {
+ +521 + + + + + + +
              r.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +522 + + + + + + +
            }
+ +523 + + + + + + +
            return r;
+ +524 + + + + + + +
          }
+ +525 + + + + + + +
        });
+ +526 + + + + + + +
  }
+ +527 + + + + + + +
+ +528 + + + + + + +
  public Rechnung getRechnung(long id) {
+ +529 + + + + + + +
    String sql =
+ +530 + + + + + + +
        "SELECT r.*, a.auftrag_nr, k.nachname, k.vorname FROM rechnung r "
+ +531 + + + + + + +
            + "LEFT JOIN auftrag a ON a.id = r.auftrag_id LEFT JOIN kunde k ON k.id = a.kunde_id WHERE r.id = ?";
+ +532 + + + + + + +
    List<Rechnung> liste =
+ +533 + + + + + + +
        jdbcTemplate.query(
+ +534 + + + + + + +
            sql,
+ +535 + + + + + + +
            new RowMapper<Rechnung>() {
+ +536 + + + + + + +
              public Rechnung mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +537 + + + + + + +
                Rechnung r = mapRechnung(rs);
+ +538 + + + + + + +
                r.setAuftragNr(rs.getString("auftrag_nr"));
+ +539 + + + + + + +
                String nn = rs.getString("nachname");
+ +540 + + + + + + +
                if (nn != null) {
+ +541 + + + + + + +
                  r.setKundeName(nn + " " + defaultString(rs.getString("vorname")));
+ +542 + + + + + + +
                }
+ +543 + + + + + + +
                return r;
+ +544 + + + + + + +
              }
+ +545 + + + + + + +
            },
+ +546 + + + + + + +
            id);
+ +547 + + +2 + +1. getRechnung : negated conditional → KILLED
+2. getRechnung : replaced return value with null for at/werkstatt/crm/service/WerkstattService::getRechnung → KILLED
+ +
+
+
    return liste.isEmpty() ? null : liste.get(0);
+ +548 + + + + + + +
  }
+ +549 + + + + + + +
+ +550 + + + + + + +
  private Rechnung mapRechnung(ResultSet rs) throws SQLException {
+ +551 + + + + + + +
    Rechnung r = new Rechnung();
+ +552 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setId → NO_COVERAGE
+ +
+
+
    r.setId(rs.getLong("id"));
+ +553 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setRechnungNr → NO_COVERAGE
+ +
+
+
    r.setRechnungNr(rs.getString("rechnung_nr"));
+ +554 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setAuftragId → NO_COVERAGE
+ +
+
+
    r.setAuftragId(rs.getLong("auftrag_id"));
+ +555 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setAusgestelltAm → NO_COVERAGE
+ +
+
+
    r.setAusgestelltAm(rs.getTimestamp("ausgestellt_am"));
+ +556 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setSummeNetto → NO_COVERAGE
+ +
+
+
    r.setSummeNetto(rs.getDouble("summe_netto"));
+ +557 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setUst → NO_COVERAGE
+ +
+
+
    r.setUst(rs.getDouble("ust"));
+ +558 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setSummeBrutto → NO_COVERAGE
+ +
+
+
    r.setSummeBrutto(rs.getDouble("summe_brutto"));
+ +559 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setBezahlt → NO_COVERAGE
+ +
+
+
    r.setBezahlt(rs.getBoolean("bezahlt"));
+ +560 + + +1 + +1. mapRechnung : removed call to at/werkstatt/crm/model/Rechnung::setBezahltAm → NO_COVERAGE
+ +
+
+
    r.setBezahltAm(rs.getTimestamp("bezahlt_am"));
+ +561 + + +1 + +1. mapRechnung : replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapRechnung → NO_COVERAGE
+ +
+
+
    return r;
+ +562 + + + + + + +
  }
+ +563 + + + + + + +
+ +564 + + + + + + +
  /**
+ +565 + + + + + + +
   * Rechnung zu einem fertigen Auftrag erstellen. Rundung auf 2 Stellen passiert hier haendisch -
+ +566 + + + + + + +
   * double reicht fuer unsere Betraege.
+ +567 + + + + + + +
   */
+ +568 + + + + + + +
  public Rechnung erstelleRechnung(long auftragId) {
+ +569 + + + + + + +
    Auftrag auftrag = getAuftrag(auftragId);
+ +570 + + +1 + +1. erstelleRechnung : negated conditional → KILLED
+ +
+
+
    if (auftrag == null) {
+ +571 + + + + + + +
      throw new RuntimeException("Auftrag " + auftragId + " nicht gefunden");
+ +572 + + + + + + +
    }
+ +573 + + +1 + +1. erstelleRechnung : negated conditional → KILLED
+ +
+
+
    if (!auftrag.getStatus().equals(Auftrag.STATUS_FERTIG)) {
+ +574 + + + + + + +
      throw new RuntimeException(
+ +575 + + + + + + +
          "Rechnung geht nur bei Status FERTIG, Auftrag "
+ +576 + + + + + + +
              + auftrag.getAuftragNr()
+ +577 + + + + + + +
              + " ist "
+ +578 + + + + + + +
              + auftrag.getStatus());
+ +579 + + + + + + +
    }
+ +580 + + + + + + +
    Integer vorhanden =
+ +581 + + + + + + +
        jdbcTemplate.queryForObject(
+ +582 + + + + + + +
            "SELECT COUNT(*) FROM rechnung WHERE auftrag_id = ?", Integer.class, auftragId);
+ +583 + + +3 + +1. erstelleRechnung : negated conditional → KILLED
+2. erstelleRechnung : changed conditional boundary → KILLED
+3. erstelleRechnung : negated conditional → KILLED
+ +
+
+
    if (vorhanden != null && vorhanden > 0) {
+ +584 + + + + + + +
      throw new RuntimeException(
+ +585 + + + + + + +
          "Zum Auftrag " + auftrag.getAuftragNr() + " gibt es schon eine Rechnung");
+ +586 + + + + + + +
    }
+ +587 + + + + + + +
+ +588 + + + + + + +
    double netto = 0;
+ +589 + + + + + + +
    for (AuftragPosition p : auftrag.getPositionen()) {
+ +590 + + +2 + +1. erstelleRechnung : Replaced double multiplication with division → SURVIVED
+2. erstelleRechnung : Replaced double addition with subtraction → SURVIVED
+ +
+
+
      netto = netto + p.getMenge() * p.getEinzelpreis();
+ +591 + + + + + + +
    }
+ +592 + + +2 + +1. erstelleRechnung : Replaced double multiplication with division → SURVIVED
+2. erstelleRechnung : Replaced double division with multiplication → SURVIVED
+ +
+
+
    netto = Math.round(netto * 100.0) / 100.0;
+ +593 + + +2 + +1. erstelleRechnung : Replaced double division with multiplication → SURVIVED
+2. erstelleRechnung : Replaced double multiplication with division → SURVIVED
+ +
+
+
    double ust = Math.round(netto * ustSatz) / 100.0;
+ +594 + + +3 + +1. erstelleRechnung : Replaced double multiplication with division → SURVIVED
+2. erstelleRechnung : Replaced double division with multiplication → SURVIVED
+3. erstelleRechnung : Replaced double addition with subtraction → SURVIVED
+ +
+
+
    double brutto = Math.round((netto + ust) * 100.0) / 100.0;
+ +595 + + + + + + +
+ +596 + + + + + + +
    int jahr = Calendar.getInstance().get(Calendar.YEAR);
+ +597 + + + + + + +
    Integer max =
+ +598 + + + + + + +
        jdbcTemplate.queryForObject(
+ +599 + + + + + + +
            "SELECT COALESCE(MAX(CAST(SUBSTRING(rechnung_nr FROM 8) AS INTEGER)), 0) FROM rechnung WHERE rechnung_nr LIKE ?",
+ +600 + + + + + + +
            Integer.class,
+ +601 + + + + + + +
            "R-" + jahr + "-%");
+ +602 + + +1 + +1. erstelleRechnung : Replaced integer addition with subtraction → SURVIVED
+ +
+
+
    String nr = "R-" + jahr + "-" + String.format("%04d", max + 1);
+ +603 + + + + + + +
+ +604 + + + + + + +
    Long neueId =
+ +605 + + + + + + +
        jdbcTemplate.queryForObject(
+ +606 + + + + + + +
            "INSERT INTO rechnung (rechnung_nr, auftrag_id, ausgestellt_am, summe_netto, ust, summe_brutto, bezahlt) "
+ +607 + + + + + + +
                + "VALUES (?, ?, now(), ?, ?, ?, false) RETURNING id",
+ +608 + + + + + + +
            Long.class,
+ +609 + + + + + + +
            nr,
+ +610 + + + + + + +
            auftragId,
+ +611 + + + + + + +
            netto,
+ +612 + + + + + + +
            ust,
+ +613 + + + + + + +
            brutto);
+ +614 + + + + + + +
+ +615 + + + + + + +
    LOG.info("Rechnung " + nr + " erstellt, brutto " + brutto);
+ +616 + + +1 + +1. erstelleRechnung : replaced return value with null for at/werkstatt/crm/service/WerkstattService::erstelleRechnung → KILLED
+ +
+
+
    return getRechnung(neueId);
+ +617 + + + + + + +
  }
+ +618 + + + + + + +
+ +619 + + + + + + +
  public Rechnung setzeBezahlt(long rechnungId) {
+ +620 + + + + + + +
    jdbcTemplate.update(
+ +621 + + + + + + +
        "UPDATE rechnung SET bezahlt = true, bezahlt_am = now() WHERE id = ?", rechnungId);
+ +622 + + +1 + +1. setzeBezahlt : replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeBezahlt → SURVIVED
+ +
+
+
    return getRechnung(rechnungId);
+ +623 + + + + + + +
  }
+ +624 + + + + + + +
+ +625 + + + + + + +
  // =====================================================================
+ +626 + + + + + + +
  // BERICHT
+ +627 + + + + + + +
  // =====================================================================
+ +628 + + + + + + +
+ +629 + + + + + + +
  public List<MonatsBericht> getMonatsBericht(int jahr) {
+ +630 + + + + + + +
    // Auftraege und Rechnungen je Monat; Umsatz nur aus Rechnungen
+ +631 + + + + + + +
    String sql =
+ +632 + + + + + + +
        "SELECT m.monat, "
+ +633 + + + + + + +
            + " (SELECT COUNT(*) FROM auftrag a WHERE EXTRACT(YEAR FROM a.angenommen_am) = ? "
+ +634 + + + + + + +
            + "   AND EXTRACT(MONTH FROM a.angenommen_am) = m.monat) AS anzahl_auftraege, "
+ +635 + + + + + + +
            + " (SELECT COUNT(*) FROM rechnung r WHERE EXTRACT(YEAR FROM r.ausgestellt_am) = ? "
+ +636 + + + + + + +
            + "   AND EXTRACT(MONTH FROM r.ausgestellt_am) = m.monat) AS anzahl_rechnungen, "
+ +637 + + + + + + +
            + " (SELECT COALESCE(SUM(r.summe_netto),0) FROM rechnung r WHERE EXTRACT(YEAR FROM r.ausgestellt_am) = ? "
+ +638 + + + + + + +
            + "   AND EXTRACT(MONTH FROM r.ausgestellt_am) = m.monat) AS umsatz_netto, "
+ +639 + + + + + + +
            + " (SELECT COALESCE(SUM(r.summe_brutto),0) FROM rechnung r WHERE EXTRACT(YEAR FROM r.ausgestellt_am) = ? "
+ +640 + + + + + + +
            + "   AND EXTRACT(MONTH FROM r.ausgestellt_am) = m.monat) AS umsatz_brutto "
+ +641 + + + + + + +
            + "FROM generate_series(1,12) AS m(monat) ORDER BY m.monat";
+ +642 + + + + + + +
    final int j = jahr;
+ +643 + + +1 + +1. getMonatsBericht : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getMonatsBericht → KILLED
+ +
+
+
    return jdbcTemplate.query(
+ +644 + + + + + + +
        sql,
+ +645 + + + + + + +
        new RowMapper<MonatsBericht>() {
+ +646 + + + + + + +
          public MonatsBericht mapRow(ResultSet rs, int rowNum) throws SQLException {
+ +647 + + + + + + +
            MonatsBericht b = new MonatsBericht();
+ +648 + + + + + + +
            b.setJahr(j);
+ +649 + + + + + + +
            b.setMonat(rs.getInt("monat"));
+ +650 + + + + + + +
            b.setAnzahlAuftraege(rs.getInt("anzahl_auftraege"));
+ +651 + + + + + + +
            b.setAnzahlRechnungen(rs.getInt("anzahl_rechnungen"));
+ +652 + + + + + + +
            b.setUmsatzNetto(rs.getDouble("umsatz_netto"));
+ +653 + + + + + + +
            b.setUmsatzBrutto(rs.getDouble("umsatz_brutto"));
+ +654 + + + + + + +
            return b;
+ +655 + + + + + + +
          }
+ +656 + + + + + + +
        },
+ +657 + + + + + + +
        jahr,
+ +658 + + + + + + +
        jahr,
+ +659 + + + + + + +
        jahr,
+ +660 + + + + + + +
        jahr);
+ +661 + + + + + + +
  }
+ +662 + + + + + + +
+ +663 + + + + + + +
  public List<Map<String, Object>> getTopKunden(int jahr) {
+ +664 + + + + + + +
    String sql =
+ +665 + + + + + + +
        "SELECT k.id, k.nachname, k.vorname, COUNT(DISTINCT a.id) AS anzahl_auftraege, "
+ +666 + + + + + + +
            + "COALESCE(SUM(r.summe_brutto),0) AS umsatz "
+ +667 + + + + + + +
            + "FROM kunde k JOIN auftrag a ON a.kunde_id = k.id "
+ +668 + + + + + + +
            + "LEFT JOIN rechnung r ON r.auftrag_id = a.id AND EXTRACT(YEAR FROM r.ausgestellt_am) = ? "
+ +669 + + + + + + +
            + "WHERE EXTRACT(YEAR FROM a.angenommen_am) = ? "
+ +670 + + + + + + +
            + "GROUP BY k.id, k.nachname, k.vorname ORDER BY umsatz DESC, anzahl_auftraege DESC LIMIT 10";
+ +671 + + +1 + +1. getTopKunden : replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getTopKunden → SURVIVED
+ +
+
+
    return jdbcTemplate.queryForList(sql, jahr, jahr);
+ +672 + + + + + + +
  }
+ +673 + + + + + + +
+ +674 + + + + + + +
  // =====================================================================
+ +675 + + + + + + +
  // ADMIN / STATISTIK (fuer die JSP-Seite)
+ +676 + + + + + + +
  // =====================================================================
+ +677 + + + + + + +
+ +678 + + + + + + +
  public Map<String, Object> getAdminStatistik() {
+ +679 + + + + + + +
    Map<String, Object> statistik = new HashMap<String, Object>();
+ +680 + + + + + + +
    statistik.put(
+ +681 + + + + + + +
        "kunden", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM kunde", Integer.class));
+ +682 + + + + + + +
    statistik.put(
+ +683 + + + + + + +
        "fahrzeuge", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM fahrzeug", Integer.class));
+ +684 + + + + + + +
    statistik.put(
+ +685 + + + + + + +
        "auftraege", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM auftrag", Integer.class));
+ +686 + + + + + + +
    statistik.put(
+ +687 + + + + + + +
        "auftraegeOffen",
+ +688 + + + + + + +
        jdbcTemplate.queryForObject(
+ +689 + + + + + + +
            "SELECT COUNT(*) FROM auftrag WHERE status IN ('ANGENOMMEN','IN_ARBEIT')",
+ +690 + + + + + + +
            Integer.class));
+ +691 + + + + + + +
    statistik.put(
+ +692 + + + + + + +
        "rechnungen", jdbcTemplate.queryForObject("SELECT COUNT(*) FROM rechnung", Integer.class));
+ +693 + + + + + + +
    statistik.put(
+ +694 + + + + + + +
        "rechnungenOffen",
+ +695 + + + + + + +
        jdbcTemplate.queryForObject(
+ +696 + + + + + + +
            "SELECT COUNT(*) FROM rechnung WHERE bezahlt = false", Integer.class));
+ +697 + + + + + + +
    statistik.put("stand", DATUM.format(new Date()));
+ +698 + + +1 + +1. getAdminStatistik : replaced return value with Collections.emptyMap for at/werkstatt/crm/service/WerkstattService::getAdminStatistik → KILLED
+ +
+
+
    return statistik;
+ +699 + + + + + + +
  }
+ +700 + + + + + + +
+ +701 + + + + + + +
  /**
+ +702 + + + + + + +
   * Raeumt stornierte Auftraege aelter als 90 Tage weg. Wird vom Chef einmal im Jahr aufgerufen.
+ +703 + + + + + + +
   * Loescht wirklich!
+ +704 + + + + + + +
   */
+ +705 + + + + + + +
  public int bereinigeStornierte() {
+ +706 + + + + + + +
    List<Long> ids =
+ +707 + + + + + + +
        jdbcTemplate.queryForList(
+ +708 + + + + + + +
            "SELECT id FROM auftrag WHERE status = 'STORNIERT' AND angenommen_am < now() - interval '90 days'",
+ +709 + + + + + + +
            Long.class);
+ +710 + + + + + + +
    for (Long id : ids) {
+ +711 + + + + + + +
      jdbcTemplate.update("DELETE FROM auftrag_position WHERE auftrag_id = ?", id);
+ +712 + + + + + + +
      jdbcTemplate.update("DELETE FROM auftrag WHERE id = ?", id);
+ +713 + + + + + + +
    }
+ +714 + + + + + + +
    LOG.warn("Bereinigung: " + ids.size() + " stornierte Auftraege geloescht");
+ +715 + + +1 + +1. bereinigeStornierte : replaced int return with 0 for at/werkstatt/crm/service/WerkstattService::bereinigeStornierte → KILLED
+ +
+
+
    return ids.size();
+ +716 + + + + + + +
  }
+ +717 + + + + + + +
+ +718 + + + + + + +
  // =====================================================================
+ +719 + + + + + + +
  // Hilfsmethoden
+ +720 + + + + + + +
  // =====================================================================
+ +721 + + + + + + +
+ +722 + + + + + + +
  private String defaultString(String s) {
+ +723 + + +1 + +1. defaultString : negated conditional → NO_COVERAGE
+ +
+
+
    if (s == null) {
+ +724 + + + + + + +
      return "";
+ +725 + + + + + + +
    }
+ +726 + + +1 + +1. defaultString : replaced return value with "" for at/werkstatt/crm/service/WerkstattService::defaultString → NO_COVERAGE
+ +
+
+
    return s;
+ +727 + + + + + + +
  }
+ +728 + + + + + + +
}

Mutations

54 + + + +

1.1
Location : getAlleKunden
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleKunden_returnsAllKunden_fromDatabase()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleKunden → KILLED + +

85 + + + +

1.1
Location : sucheKunden
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_withValidInput_performsSearch()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::sucheKunden → KILLED + +

132 + + + +

1.1
Location : getKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_notFound_returnsNull()]
negated conditional → KILLED + +

135 + + + +

1.1
Location : getKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_found_returnsKunde()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getKunde → KILLED + +

139 + + + +

1.1
Location : speichereKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()]
negated conditional → KILLED + +

154 + + + +

1.1
Location : speichereKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

170 + + + +

1.1
Location : speichereKunde
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereKunde → KILLED + +

186 + + + +

1.1
Location : getAlleFahrzeuge
Killed by : none
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleFahrzeuge → SURVIVED +
Covering tests +

+
202 + + + +

1.1
Location : getFahrzeugeZuKunde
Killed by : none
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getFahrzeugeZuKunde → SURVIVED +
Covering tests +

+
222 + + + +

1.1
Location : getFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getFahrzeug → KILLED +

2.2
Location : getFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_notFound_returnsNull()]
negated conditional → KILLED + +

228 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setId → NO_COVERAGE + +

229 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setKundeId → NO_COVERAGE + +

230 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setKennzeichen → NO_COVERAGE + +

231 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setMarke → NO_COVERAGE + +

232 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setModell → NO_COVERAGE + +

233 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setFahrgestellnr → NO_COVERAGE + +

235 + + + +

1.1
Location : mapFahrzeug
Killed by : none
negated conditional → NO_COVERAGE + +

236 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setBaujahr → NO_COVERAGE + +

239 + + + +

1.1
Location : mapFahrzeug
Killed by : none
negated conditional → NO_COVERAGE + +

240 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setKmStand → NO_COVERAGE + +

242 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setPickerlDatum → NO_COVERAGE + +

243 + + + +

1.1
Location : mapFahrzeug
Killed by : none
removed call to at/werkstatt/crm/model/Fahrzeug::setAngelegtAm → NO_COVERAGE + +

244 + + + +

1.1
Location : mapFahrzeug
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapFahrzeug → NO_COVERAGE + +

248 + + + +

1.1
Location : speichereFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]
negated conditional → KILLED + +

262 + + + +

1.1
Location : speichereFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]
removed call to at/werkstatt/crm/model/Fahrzeug::setId → KILLED + +

276 + + + +

1.1
Location : speichereFahrzeug
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereFahrzeug → KILLED + +

291 + + + +

1.1
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]
negated conditional → KILLED +

2.2
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]
negated conditional → KILLED +

3.3
Location : getAuftraege
Killed by : none
changed conditional boundary → SURVIVED +
Covering tests +

+
292 + + + +

1.1
Location : getAuftraege
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
296 + + + +

1.1
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]
negated conditional → KILLED + +

297 + + + +

1.1
Location : getAuftraege
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAuftraege → KILLED + +

339 + + + +

1.1
Location : getAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_notFound_returnsNull()]
negated conditional → KILLED + +

343 + + + +

1.1
Location : getAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setPositionen_inGetterCalls_OneSetPositionen()]
removed call to at/werkstatt/crm/model/Auftrag::setPositionen → KILLED + +

344 + + + +

1.1
Location : getAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_found_returnsAuftragWithPositionen()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getAuftrag → KILLED + +

349 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setId → NO_COVERAGE + +

350 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → NO_COVERAGE + +

351 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setFahrzeugId → NO_COVERAGE + +

352 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setKundeId → NO_COVERAGE + +

353 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setStatus → NO_COVERAGE + +

354 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setBeschreibung → NO_COVERAGE + +

356 + + + +

1.1
Location : mapAuftrag
Killed by : none
negated conditional → NO_COVERAGE + +

357 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setKmStand → NO_COVERAGE + +

359 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAngenommenAm → NO_COVERAGE + +

360 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setFertigAm → NO_COVERAGE + +

361 + + + +

1.1
Location : mapAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAbgeholtAm → NO_COVERAGE + +

362 + + + +

1.1
Location : mapAuftrag
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapAuftrag → NO_COVERAGE + +

366 + + + +

1.1
Location : getPositionen
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setPositionen_inGetterCalls_OneSetPositionen()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getPositionen → KILLED + +

394 + + + +

1.1
Location : neuerAuftrag
Killed by : none
Replaced integer addition with subtraction → SURVIVED +
Covering tests +

+
395 + + + +

1.1
Location : neuerAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr → SURVIVED +
Covering tests +

+
396 + + + +

1.1
Location : neuerAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setStatus → SURVIVED +
Covering tests +

+
409 + + + +

1.1
Location : neuerAuftrag
Killed by : none
removed call to at/werkstatt/crm/model/Auftrag::setId → SURVIVED +
Covering tests +

+
412 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_withKmStand_updatesFahrzeugKmStand()]
negated conditional → KILLED + +

420 + + + +

1.1
Location : neuerAuftrag
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_returnsNewAuftragWithGeneratedNumber()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuerAuftrag → KILLED + +

429 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_nonExistingAuftrag_throwsRuntimeException()]
negated conditional → KILLED + +

435 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]
negated conditional → KILLED + +

436 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_validTransition_statusUpdated()]
negated conditional → KILLED + +

437 + + + +

1.1
Location : setzeStatus
Killed by : none
negated conditional → NO_COVERAGE + +

440 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]
negated conditional → KILLED + +

441 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]
negated conditional → KILLED + +

442 + + + +

1.1
Location : setzeStatus
Killed by : none
negated conditional → NO_COVERAGE + +

445 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_backToArbeitFromFertig_allowed()]
negated conditional → KILLED + +

446 + + + +

1.1
Location : setzeStatus
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
450 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_backToArbeitFromFertig_allowed()]
negated conditional → KILLED + +

455 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]
negated conditional → KILLED + +

461 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]
negated conditional → KILLED + +

464 + + + +

1.1
Location : setzeStatus
Killed by : none
negated conditional → SURVIVED +
Covering tests +

+
471 + + + +

1.1
Location : setzeStatus
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_validTransition_statusUpdated()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeStatus → KILLED + +

476 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_auftragAbgeschlossen_throwsRuntimeException()]
negated conditional → KILLED + +

479 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_auftragAbgeschlossen_throwsRuntimeException()]
negated conditional → KILLED + +

480 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]
negated conditional → KILLED + +

495 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]
removed call to at/werkstatt/crm/model/AuftragPosition::setId → KILLED + +

496 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]
removed call to at/werkstatt/crm/model/AuftragPosition::setAuftragId → KILLED + +

497 + + + +

1.1
Location : neuePosition
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuePosition → KILLED + +

513 + + + +

1.1
Location : getAlleRechnungen
Killed by : none
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleRechnungen → NO_COVERAGE + +

547 + + + +

1.1
Location : getRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeBezahlt_updatesRechnung_toBezahlt()]
negated conditional → KILLED +

2.2
Location : getRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::getRechnung → KILLED + +

552 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setId → NO_COVERAGE + +

553 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setRechnungNr → NO_COVERAGE + +

554 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setAuftragId → NO_COVERAGE + +

555 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setAusgestelltAm → NO_COVERAGE + +

556 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setSummeNetto → NO_COVERAGE + +

557 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setUst → NO_COVERAGE + +

558 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setSummeBrutto → NO_COVERAGE + +

559 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setBezahlt → NO_COVERAGE + +

560 + + + +

1.1
Location : mapRechnung
Killed by : none
removed call to at/werkstatt/crm/model/Rechnung::setBezahltAm → NO_COVERAGE + +

561 + + + +

1.1
Location : mapRechnung
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapRechnung → NO_COVERAGE + +

570 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_auftragNichtGefunden_throwsRuntimeException()]
negated conditional → KILLED + +

573 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_auftragNichtFertig_throwsRuntimeException()]
negated conditional → KILLED + +

583 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException()]
negated conditional → KILLED +

2.2
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]
changed conditional boundary → KILLED +

3.3
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException()]
negated conditional → KILLED + +

590 + + + +

1.1
Location : erstelleRechnung
Killed by : none
Replaced double multiplication with division → SURVIVED +
Covering tests +

2.2
Location : erstelleRechnung
Killed by : none
Replaced double addition with subtraction → SURVIVED +Covering tests +

+
592 + + + +

1.1
Location : erstelleRechnung
Killed by : none
Replaced double multiplication with division → SURVIVED +
Covering tests +

2.2
Location : erstelleRechnung
Killed by : none
Replaced double division with multiplication → SURVIVED +Covering tests +

+
593 + + + +

1.1
Location : erstelleRechnung
Killed by : none
Replaced double division with multiplication → SURVIVED +
Covering tests +

2.2
Location : erstelleRechnung
Killed by : none
Replaced double multiplication with division → SURVIVED +Covering tests +

+
594 + + + +

1.1
Location : erstelleRechnung
Killed by : none
Replaced double multiplication with division → SURVIVED +
Covering tests +

2.2
Location : erstelleRechnung
Killed by : none
Replaced double division with multiplication → SURVIVED +Covering tests +

3.3
Location : erstelleRechnung
Killed by : none
Replaced double addition with subtraction → SURVIVED +Covering tests +

+
602 + + + +

1.1
Location : erstelleRechnung
Killed by : none
Replaced integer addition with subtraction → SURVIVED +
Covering tests +

+
616 + + + +

1.1
Location : erstelleRechnung
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]
replaced return value with null for at/werkstatt/crm/service/WerkstattService::erstelleRechnung → KILLED + +

622 + + + +

1.1
Location : setzeBezahlt
Killed by : none
replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeBezahlt → SURVIVED +
Covering tests +

+
643 + + + +

1.1
Location : getMonatsBericht
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returns12Months()]
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getMonatsBericht → KILLED + +

671 + + + +

1.1
Location : getTopKunden
Killed by : none
replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getTopKunden → SURVIVED +
Covering tests +

+
698 + + + +

1.1
Location : getAdminStatistik
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAdminStatistik_returnsAllFields()]
replaced return value with Collections.emptyMap for at/werkstatt/crm/service/WerkstattService::getAdminStatistik → KILLED + +

715 + + + +

1.1
Location : bereinigeStornierte
Killed by : at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:bereinigeStornierte_deletesOldStornierte()]
replaced int return with 0 for at/werkstatt/crm/service/WerkstattService::bereinigeStornierte → KILLED + +

723 + + + +

1.1
Location : defaultString
Killed by : none
negated conditional → NO_COVERAGE + +

726 + + + +

1.1
Location : defaultString
Killed by : none
replaced return value with "" for at/werkstatt/crm/service/WerkstattService::defaultString → NO_COVERAGE + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()] (1053 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException()] (6 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_found_returnsAuftragWithPositionen()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_auftragAbgeschlossen_throwsRuntimeException()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setPositionen_inGetterCalls_OneSetPositionen()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_invalidTransition_throwsRuntimeException()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_auftragNichtFertig_throwsRuntimeException()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_validTransition_statusUpdated()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_afterAbgeholt_throwsException()] (6 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_backToArbeitFromFertig_allowed()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_returnsNewAuftragWithGeneratedNumber()] (8 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_withKmStand_updatesFahrzeugKmStand()] (7 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:bereinigeStornierte_deletesOldStornierte()] (6 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_notFound_returnsNull()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_nonExistingAuftrag_throwsRuntimeException()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_auftragNotFound_throwsRuntimeException()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_auftragNichtGefunden_throwsRuntimeException()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_withValidInput_performsSearch()] (1 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_emptyInput_returnsEmptyList()] (7 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleFahrzeuge_returnsAllFahrzeuge()] (14 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_update_executesUpdate()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeBezahlt_updatesRechnung_toBezahlt()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returns12Months()] (4 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withNullStatus_returnsAll()] (3 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeugeZuKunde_returnsFahrzeuge_forGivenKundeId()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_update_returnsUpdatedKunde()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_notFound_returnsNull()] (5 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleKunden_returnsAllKunden_fromDatabase()] (8 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_found_returnsKunde()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_notFound_returnsNull()] (2 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAdminStatistik_returnsAllFields()] (11 ms)
  • at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getTopKunden_executesQuery_withTwoParams()] (3 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html new file mode 100644 index 0000000..53e774f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/at.werkstatt.crm.service/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.service

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
183%
236/286
44%
49/111
69%
49/71
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
WerkstattService.java
83%
236/286
44%
49/111
69%
49/71
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..d63a229 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
183%
236/286
44%
49/111
69%
49/71
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.service1
83%
236/286
44%
49/111
69%
49/71
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..b69054d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,114 @@ + + +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicebereinigeStornierte()I715org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator6612at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:bereinigeStornierte_deletesOldStornierte()]replaced int return with 0 for at/werkstatt/crm/service/WerkstattService::bereinigeStornierte +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicedefaultString(Ljava/lang/String;)Ljava/lang/String;723org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator40negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicedefaultString(Ljava/lang/String;)Ljava/lang/String;726org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator132replaced return value with "" for at/werkstatt/crm/service/WerkstattService::defaultString +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;583org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator6915at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]changed conditional boundary +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;590org.pitest.mutationtest.engine.gregor.mutators.MathMutator10827Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;590org.pitest.mutationtest.engine.gregor.mutators.MathMutator10927Replaced double addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;592org.pitest.mutationtest.engine.gregor.mutators.MathMutator11928Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;592org.pitest.mutationtest.engine.gregor.mutators.MathMutator12329Replaced double division with multiplication +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;593org.pitest.mutationtest.engine.gregor.mutators.MathMutator13129Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;593org.pitest.mutationtest.engine.gregor.mutators.MathMutator13530Replaced double division with multiplication +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;594org.pitest.mutationtest.engine.gregor.mutators.MathMutator14130Replaced double addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;594org.pitest.mutationtest.engine.gregor.mutators.MathMutator14330Replaced double multiplication with division +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;594org.pitest.mutationtest.engine.gregor.mutators.MathMutator14731Replaced double division with multiplication +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;602org.pitest.mutationtest.engine.gregor.mutators.MathMutator18435Replaced integer addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;570org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator101at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_auftragNichtGefunden_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;573org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator266at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_auftragNichtFertig_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;583org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6613at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;583org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6915at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceerstelleRechnung(J)Lat/werkstatt/crm/model/Rechnung;616org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator24845at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::erstelleRechnung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAdminStatistik()Ljava/util/Map;698org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator11116at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAdminStatistik_returnsAllFields()]replaced return value with Collections.emptyMap for at/werkstatt/crm/service/WerkstattService::getAdminStatistik +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAlleFahrzeuge()Ljava/util/List;186org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator152replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleFahrzeuge +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAlleKunden()Ljava/util/List;54org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator152at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAlleKunden_returnsAllKunden_fromDatabase()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleKunden +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAlleRechnungen()Ljava/util/List;513org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator152replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAlleRechnungen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;291org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator112changed conditional boundary +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;291org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator80at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;291org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator112at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;292org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator235negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;296org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator387at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftraege(Ljava/lang/String;)Ljava/util/List;297org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator6412at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftraege_withStatus_filtersByStatus()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getAuftraege +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftrag(J)Lat/werkstatt/crm/model/Auftrag;339org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator314at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_notFound_returnsNull()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftrag(J)Lat/werkstatt/crm/model/Auftrag;343org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator508at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setPositionen_inGetterCalls_OneSetPositionen()]removed call to at/werkstatt/crm/model/Auftrag::setPositionen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetAuftrag(J)Lat/werkstatt/crm/model/Auftrag;344org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator549at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getAuftrag_found_returnsAuftragWithPositionen()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getAuftrag +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetFahrzeug(J)Lat/werkstatt/crm/model/Fahrzeug;222org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator274at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getFahrzeug_notFound_returnsNull()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetFahrzeug(J)Lat/werkstatt/crm/model/Fahrzeug;222org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator388at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getFahrzeug +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetFahrzeugeZuKunde(J)Ljava/util/List;202org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator223replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getFahrzeugeZuKunde +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetKunde(J)Lat/werkstatt/crm/model/Kunde;132org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator274at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_notFound_returnsNull()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetKunde(J)Lat/werkstatt/crm/model/Kunde;135org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator397at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getKunde_found_returnsKunde()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getKunde +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetMonatsBericht(I)Ljava/util/List;643org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator526at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:getMonatsBericht_returns12Months()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getMonatsBericht +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetPositionen(J)Ljava/util/List;366org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator223at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setPositionen_inGetterCalls_OneSetPositionen()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getPositionen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetRechnung(J)Lat/werkstatt/crm/model/Rechnung;547org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator314at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeBezahlt_updatesRechnung_toBezahlt()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetRechnung(J)Lat/werkstatt/crm/model/Rechnung;547org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator428at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:erstelleRechnung_success_createsRechnungWithCorrectValues()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::getRechnung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicegetTopKunden(I)Ljava/util/List;671org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator233replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::getTopKunden +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;356org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6218negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;349org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator143removed call to at/werkstatt/crm/model/Auftrag::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;350org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator215removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;351org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator298removed call to at/werkstatt/crm/model/Auftrag::setFahrzeugId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;352org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator3711removed call to at/werkstatt/crm/model/Auftrag::setKundeId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;353org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4413removed call to at/werkstatt/crm/model/Auftrag::setStatus +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;354org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5115removed call to at/werkstatt/crm/model/Auftrag::setBeschreibung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;357org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6820removed call to at/werkstatt/crm/model/Auftrag::setKmStand +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;359org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator7622removed call to at/werkstatt/crm/model/Auftrag::setAngenommenAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;360org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator8324removed call to at/werkstatt/crm/model/Auftrag::setFertigAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;361org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator9026removed call to at/werkstatt/crm/model/Auftrag::setAbgeholtAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapAuftrag(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Auftrag;362org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator9427replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapAuftrag +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;235org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6117negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;239org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator7922negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;228org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator143removed call to at/werkstatt/crm/model/Fahrzeug::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;229org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator226removed call to at/werkstatt/crm/model/Fahrzeug::setKundeId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;230org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator298removed call to at/werkstatt/crm/model/Fahrzeug::setKennzeichen +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;231org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator3610removed call to at/werkstatt/crm/model/Fahrzeug::setMarke +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;232org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4312removed call to at/werkstatt/crm/model/Fahrzeug::setModell +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;233org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5014removed call to at/werkstatt/crm/model/Fahrzeug::setFahrgestellnr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;236org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6719removed call to at/werkstatt/crm/model/Fahrzeug::setBaujahr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;240org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator8524removed call to at/werkstatt/crm/model/Fahrzeug::setKmStand +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;242org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator9326removed call to at/werkstatt/crm/model/Fahrzeug::setPickerlDatum +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;243org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator10028removed call to at/werkstatt/crm/model/Fahrzeug::setAngelegtAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapFahrzeug(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Fahrzeug;244org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator10429replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapFahrzeug +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;552org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator143removed call to at/werkstatt/crm/model/Rechnung::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;553org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator215removed call to at/werkstatt/crm/model/Rechnung::setRechnungNr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;554org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator298removed call to at/werkstatt/crm/model/Rechnung::setAuftragId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;555org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator3610removed call to at/werkstatt/crm/model/Rechnung::setAusgestelltAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;556org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator4312removed call to at/werkstatt/crm/model/Rechnung::setSummeNetto +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;557org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5014removed call to at/werkstatt/crm/model/Rechnung::setUst +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;558org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator5716removed call to at/werkstatt/crm/model/Rechnung::setSummeBrutto +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;559org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator6418removed call to at/werkstatt/crm/model/Rechnung::setBezahlt +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;560org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator7120removed call to at/werkstatt/crm/model/Rechnung::setBezahltAm +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicemapRechnung(Ljava/sql/ResultSet;)Lat/werkstatt/crm/model/Rechnung;561org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator7521replaced return value with null for at/werkstatt/crm/service/WerkstattService::mapRechnung +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;476org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator101at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_auftragAbgeschlossen_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;479org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator266at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_auftragAbgeschlossen_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;480org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator339at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;495org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator10121at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]removed call to at/werkstatt/crm/model/AuftragPosition::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;496org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator10723at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]removed call to at/werkstatt/crm/model/AuftragPosition::setAuftragId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuePosition(JLat/werkstatt/crm/model/AuftragPosition;)Lat/werkstatt/crm/model/AuftragPosition;497org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator11124at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuePosition_success_returnsPosition()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuePosition +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;394org.pitest.mutationtest.engine.gregor.mutators.MathMutator364Replaced integer addition with subtraction +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;412org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator11316at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_withKmStand_updatesFahrzeugKmStand()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;395org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator466removed call to at/werkstatt/crm/model/Auftrag::setAuftragNr +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;396org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator517removed call to at/werkstatt/crm/model/Auftrag::setStatus +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;409org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator10814removed call to at/werkstatt/crm/model/Auftrag::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServiceneuerAuftrag(Lat/werkstatt/crm/model/Auftrag;)Lat/werkstatt/crm/model/Auftrag;420org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator15425at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:neuerAuftrag_returnsNewAuftragWithGeneratedNumber()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::neuerAuftrag +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeBezahlt(J)Lat/werkstatt/crm/model/Rechnung;622org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator243replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeBezahlt +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;429org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator101at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_nonExistingAuftrag_throwsRuntimeException()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;435org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator346at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;436org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator408at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_validTransition_statusUpdated()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;437org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator4610negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;440org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator5913at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;441org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator6515at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;442org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator7117negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;445org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator8420at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_backToArbeitFromFertig_allowed()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;446org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator9022negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;450org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator10125at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_backToArbeitFromFertig_allowed()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;455org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator11027at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;461org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator13031at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_fertig_updatesFertigAm()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;464org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator14234negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesetzeStatus(JLjava/lang/String;)Lat/werkstatt/crm/model/Auftrag;471org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator18641at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:setzeStatus_validTransition_statusUpdated()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::setzeStatus +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereFahrzeug(Lat/werkstatt/crm/model/Fahrzeug;)Lat/werkstatt/crm/model/Fahrzeug;248org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator51at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereFahrzeug(Lat/werkstatt/crm/model/Fahrzeug;)Lat/werkstatt/crm/model/Fahrzeug;262org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator7911at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]removed call to at/werkstatt/crm/model/Fahrzeug::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereFahrzeug(Lat/werkstatt/crm/model/Fahrzeug;)Lat/werkstatt/crm/model/Fahrzeug;276org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator16627at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereFahrzeug_insert_returnsSavedFahrzeug()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereFahrzeug +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereKunde(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;139org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator51at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()]negated conditional +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereKunde(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;154org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator8612at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()]removed call to at/werkstatt/crm/model/Kunde::setId +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicespeichereKunde(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;170org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator18831at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:speichereKunde_newInsert_returnsSavedKunde()]replaced return value with null for at/werkstatt/crm/service/WerkstattService::speichereKunde +WerkstattService.javaat.werkstatt.crm.service.WerkstattServicesucheKunden(Ljava/lang/String;)Ljava/util/List;85org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator414at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.WerkstattServiceGeneratedTest]/[method:sucheKunden_withValidInput_performsSearch()]replaced return value with Collections.emptyList for at/werkstatt/crm/service/WerkstattService::sucheKunden + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml new file mode 100644 index 0000000..ef3bac1 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IN_ARBEIT +]]> + + + + + + + + + + + + + + + + + + + IN_ARBEIT +]]> + + + + + + + + + + + + FERTIG +]]> + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt new file mode 100644 index 0000000..d40d614 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.WerkstattServiceGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.WerkstattServiceGeneratedTest +------------------------------------------------------------------------------- +Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.273 s -- in at.werkstatt.crm.gen.WerkstattServiceGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java new file mode 100644 index 0000000..f6c4ea0 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/repaired/WerkstattServiceGeneratedTest.java @@ -0,0 +1,679 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.model.MonatsBericht; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.jdbc.core.RowMapper; + +import java.util.*; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +class WerkstattServiceGeneratedTest { + + private static final String SQL_AUFTRAG = "FROM auftrag a"; + private static final String SQL_POSITION = "auftrag_position"; + private static final int JAHR = Calendar.getInstance().get(Calendar.YEAR); + + private WerkstattService service; + + @Mock + private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + service = new WerkstattService(jdbcTemplate, 20); + } + + // ==================== KUNDEN ==================== + + @Test + void getAlleKunden_returnsAllKunden_fromDatabase() { + List expectedKunden = new ArrayList<>(); + Kunde k1 = new Kunde(); + k1.setId(1L); + expectedKunden.add(k1); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expectedKunden); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq("muster"))).thenReturn(expectedKunden); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(expectedKunden); + when(jdbcTemplate.queryForList(anyString(), eq(2023), eq(2023))).thenReturn(Collections.emptyList()); + when(jdbcTemplate.queryForObject(anyString(), any(Class.class))).thenReturn(1); + when(jdbcTemplate.queryForObject(anyString(), any(Class.class), any(Object[].class))).thenReturn(1L); + + // Mock row mapper calls for each query + List result = service.getAlleKunden(); + + assertThat(result).isEqualTo(expectedKunden); + verify(jdbcTemplate).query(anyString(), any(RowMapper.class)); + } + + @Test + void sucheKunden_emptyInput_returnsEmptyList() { + List expected = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq("%%"), eq("%%"), eq("%%"))).thenReturn(expected); + + List result = service.sucheKunden(""); + + assertThat(result).isEmpty(); + verify(jdbcTemplate).query(anyString(), any(RowMapper.class), eq("%%"), eq("%%"), eq("%%")); + } + + @Test + void sucheKunden_withValidInput_performsSearch() { + List expected = new ArrayList<>(); + Kunde k1 = new Kunde(); + k1.setId(1L); + k1.setNachname("Müller"); + expected.add(k1); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq("%müller%"), eq("%müller%"), eq("%müller%"))) + .thenReturn(expected); + + List result = service.sucheKunden("Müller"); + + assertThat(result).hasSize(1); + assertThat(result.get(0).getNachname()).isEqualTo("Müller"); + } + + @Test + void getKunde_found_returnsKunde() { + Kunde k1 = new Kunde(); + k1.setId(1L); + List liste = Collections.singletonList(k1); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Kunde result = service.getKunde(1L); + + assertThat(result).isNotNull(); + assertThat(result.getId()).isEqualTo(1L); + } + + @Test + void getKunde_notFound_returnsNull() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Kunde result = service.getKunde(1L); + + assertThat(result).isNull(); + } + + @Test + void speichereKunde_newInsert_returnsSavedKunde() { + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))).thenReturn(42L); + Kunde gespeichert = new Kunde(); + gespeichert.setId(42L); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(42L))) + .thenReturn(Collections.singletonList(gespeichert)); + + Kunde k = new Kunde(); + k.setAnrede("Herr"); + k.setVorname("Max"); + k.setNachname("Mustermann"); + k.setTelefon("0664/1234567"); + k.setEmail("max@ Beispiel.com"); + k.setStrasse("Beispielstraße 1"); + k.setPlz("1234"); + k.setOrt(" Beispielstadt"); + k.setNotiz("Testkunde"); + + Kunde saved = service.speichereKunde(k); + + assertThat(saved.getId()).isEqualTo(42L); + assertThat(k.getId()).isEqualTo(42L); + verify(jdbcTemplate).queryForObject(anyString(), eq(Long.class), any(Object[].class)); + } + + @Test + void speichereKunde_update_returnsUpdatedKunde() { + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(Collections.emptyList()); + List liste = new ArrayList<>(); + Kunde k1 = new Kunde(); + k1.setId(1L); + k1.setVorname("Updated"); + liste.add(k1); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Kunde k = new Kunde(); + k.setId(1L); + k.setAnrede("Frau"); + k.setVorname("Updated"); + k.setNachname("Test"); + + Kunde result = service.speichereKunde(k); + + assertThat(result.getVorname()).isEqualTo("Updated"); + verify(jdbcTemplate).update(anyString(), any(Object[].class)); + } + + @Test + void loescheKunde_executesDelete() { + long kundeId = 1L; + + service.loescheKunde(kundeId); + + verify(jdbcTemplate).update(anyString(), eq(kundeId)); + } + + // ==================== FAHRZEUGE ==================== + + @Test + void getAlleFahrzeuge_returnsAllFahrzeuge() { + List fahrzeuge = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(fahrzeuge); + + List result = service.getAlleFahrzeuge(); + + assertThat(result).isEqualTo(fahrzeuge); + } + + @Test + void getFahrzeugeZuKunde_returnsFahrzeuge_forGivenKundeId() { + List fahrzeuge = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(fahrzeuge); + + List result = service.getFahrzeugeZuKunde(1L); + + assertThat(result).isEqualTo(fahrzeuge); + } + + @Test + void getFahrzeug_notFound_returnsNull() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Fahrzeug result = service.getFahrzeug(1L); + + assertThat(result).isNull(); + } + + @Test + void speichereFahrzeug_insert_returnsSavedFahrzeug() { + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))).thenReturn(42L); + List fahrzeuge = new ArrayList<>(); + Fahrzeug f = new Fahrzeug(); + f.setId(42L); + fahrzeuge.add(f); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(42L))).thenReturn(fahrzeuge); + + Fahrzeug fahrzeug = new Fahrzeug(); + fahrzeug.setKundeId(1L); + fahrzeug.setKennzeichen("ABC-123"); + fahrzeug.setMarke("VW"); + fahrzeug.setModell("Golf"); + + Fahrzeug result = service.speichereFahrzeug(fahrzeug); + + assertThat(result.getId()).isEqualTo(42L); + } + + @Test + void speichereFahrzeug_update_executesUpdate() { + List fahrzeuge = new ArrayList<>(); + Fahrzeug f = new Fahrzeug(); + f.setId(1L); + fahrzeuge.add(f); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(fahrzeuge); + + Fahrzeug fahrzeug = new Fahrzeug(); + fahrzeug.setId(1L); + fahrzeug.setKennzeichen("NEW-123"); + + service.speichereFahrzeug(fahrzeug); + + verify(jdbcTemplate).update(anyString(), any(Object[].class)); + } + + @Test + void loescheFahrzeug_executesDelete() { + service.loescheFahrzeug(1L); + + verify(jdbcTemplate).update(anyString(), eq(1L)); + } + + // ==================== AUFTRAEGE ==================== + + @Test + void getAuftraege_withNullStatus_returnsAll() { + List liste = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), any())).thenReturn(liste); + + List result = service.getAuftraege(null); + + assertThat(result).isEqualTo(liste); + } + + @Test + void getAuftraege_withStatus_filtersByStatus() { + List liste = Collections.singletonList(new Auftrag()); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(Auftrag.STATUS_ANGENOMMEN))).thenReturn(liste); + + List result = service.getAuftraege(Auftrag.STATUS_ANGENOMMEN); + + assertThat(result).hasSize(1); + } + + @Test + void getAuftrag_notFound_returnsNull() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Auftrag result = service.getAuftrag(1L); + + assertThat(result).isNull(); + } + + @Test + void getAuftrag_found_returnsAuftragWithPositionen() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + List liste = Collections.singletonList(auftrag); + List positionen = new ArrayList<>(); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(positionen); + + Auftrag result = service.getAuftrag(1L); + + assertThat(result).isNotNull(); + assertThat(result.getPositionen()).isEqualTo(positionen); + } + + @Test + void setPositionen_inGetterCalls_OneSetPositionen() { + Auftrag a = new Auftrag(); + a.setId(1L); + List liste = Collections.singletonList(a); + List pos = new ArrayList<>(); + pos.add(new AuftragPosition()); + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + + Auftrag result = service.getAuftrag(1L); + assertThat(result.getPositionen()).hasSize(1); + } + + @Test + void neuerAuftrag_returnsNewAuftragWithGeneratedNumber() { + Integer max = 5; + List liste = new ArrayList<>(); + Auftrag a = new Auftrag(); + a.setId(10L); + a.setAuftragNr("A-" + JAHR + "-0006"); + a.setStatus(Auftrag.STATUS_ANGENOMMEN); + liste.add(a); + + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq("A-" + JAHR + "-%"))).thenReturn(max); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))).thenReturn(10L); + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(10L))).thenReturn(liste); + + Auftrag input = new Auftrag(); + input.setFahrzeugId(100L); + input.setKundeId(1L); + input.setStatus("ANGENOMMEN"); + input.setBeschreibung("Test"); + + Auftrag result = service.neuerAuftrag(input); + + assertThat(result.getAuftragNr()).isEqualTo("A-" + JAHR + "-0006"); + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_ANGENOMMEN); + assertThat(result.getId()).isEqualTo(10L); + } + + @Test + void setzeStatus_invalidTransition_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_ABGEHOLT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.setzeStatus(1L, Auftrag.STATUS_ANGENOMMEN)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Statuswechsel ABGEHOLT -> ANGENOMMEN ist nicht erlaubt"); + } + + @Test + void setzeStatus_validTransition_statusUpdated() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN); + List liste = Collections.singletonList(auftrag); + Auftrag nachher = new Auftrag(); + nachher.setId(1L); + nachher.setAuftragNr("A-2025-0001"); + nachher.setStatus(Auftrag.STATUS_IN_ARBEIT); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))) + .thenReturn(liste, Collections.singletonList(nachher)); + + Auftrag result = service.setzeStatus(1L, Auftrag.STATUS_IN_ARBEIT); + + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_IN_ARBEIT); + verify(jdbcTemplate).update(anyString(), eq(Auftrag.STATUS_IN_ARBEIT), eq(1L)); + } + + @Test + void setzeStatus_fertig_updatesFertigAm() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_IN_ARBEIT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + service.setzeStatus(1L, Auftrag.STATUS_FERTIG); + + verify(jdbcTemplate).update(contains("fertig_am = now()"), eq(Auftrag.STATUS_FERTIG), eq(1L)); + } + + @Test + void setzeStatus_nonExistingAuftrag_throwsRuntimeException() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.setzeStatus(1L, Auftrag.STATUS_IN_ARBEIT)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag 1 nicht gefunden"); + } + + @Test + void neuePosition_auftragNotFound_throwsRuntimeException() { + Long auftragId = 1L; + List liste = Collections.emptyList(); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(auftragId))).thenReturn(liste); + + assertThatThrownBy(() -> service.neuePosition(auftragId, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag 1 nicht gefunden"); + } + + @Test + void neuePosition_auftragAbgeschlossen_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_ABGEHOLT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.neuePosition(1L, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag null ist abgeschlossen, keine Positionen mehr moeglich"); + } + + @Test + void neuePosition_success_returnsPosition() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN); + List liste = Collections.singletonList(auftrag); + AuftragPosition p = new AuftragPosition(); + p.setTyp(AuftragPosition.TYP_ARBEIT); + p.setBezeichnung("Reparatur"); + p.setMenge(1.5); + p.setEinzelpreis(80.0); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))).thenReturn(7L); + + AuftragPosition result = service.neuePosition(1L, p); + + assertThat(result.getId()).isEqualTo(7L); + assertThat(result.getAuftragId()).isEqualTo(1L); + verify(jdbcTemplate).queryForObject(anyString(), eq(Long.class), any(Object[].class)); + } + + @Test + void loeschePosition_executesDelete() { + service.loeschePosition(9L); + + verify(jdbcTemplate).update(anyString(), eq(9L)); + } + + // ==================== RECHNUNGEN ==================== + + @Test + void erstelleRechnung_auftragNichtGefunden_throwsRuntimeException() { + Long auftragId = 1L; + List liste = Collections.emptyList(); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(auftragId))).thenReturn(liste); + + assertThatThrownBy(() -> service.erstelleRechnung(auftragId)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag 1 nicht gefunden"); + } + + @Test + void erstelleRechnung_auftragNichtFertig_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_IN_ARBEIT); + List liste = Collections.singletonList(auftrag); + List pos = new ArrayList<>(); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + + assertThatThrownBy(() -> service.erstelleRechnung(1L)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Rechnung geht nur bei Status FERTIG, Auftrag A-2025-0001 ist IN_ARBEIT"); + } + + @Test + void erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_FERTIG); + List liste = Collections.singletonList(auftrag); + List pos = new ArrayList<>(); + AuftragPosition p = new AuftragPosition(); + p.setMenge(2.0); + p.setEinzelpreis(50.0); + pos.add(p); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + when(jdbcTemplate.queryForObject(contains("FROM rechnung"), eq(Integer.class), eq(1L))).thenReturn(1); + + assertThatThrownBy(() -> service.erstelleRechnung(1L)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Zum Auftrag null gibt es schon eine Rechnung"); + } + + @Test + void erstelleRechnung_success_createsRechnungWithCorrectValues() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_FERTIG); + List liste = Collections.singletonList(auftrag); + + List pos = new ArrayList<>(); + AuftragPosition p = new AuftragPosition(); + p.setMenge(2.0); + p.setEinzelpreis(50.0); // 2*50 = 100 netto + pos.add(p); + auftrag.setPositionen(pos); + + Integer bestanden = 0; + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + when(jdbcTemplate.queryForObject(contains("COUNT(*) FROM rechnung"), eq(Integer.class), eq(1L))) + .thenReturn(bestanden); + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq("R-" + JAHR + "-%"))).thenReturn(0); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))).thenReturn(101L); + + List rechnungList = new ArrayList<>(); + Rechnung r = new Rechnung(); + r.setId(101L); + r.setRechnungNr("R-" + JAHR + "-0001"); + r.setSummeNetto(100.0); + r.setUst(20.0); + r.setSummeBrutto(120.0); + rechnungList.add(r); + + when(jdbcTemplate.query(contains("FROM rechnung r"), any(RowMapper.class), eq(101L))).thenReturn(rechnungList); + + Rechnung result = service.erstelleRechnung(1L); + + assertThat(result.getRechnungNr()).isEqualTo("R-" + JAHR + "-0001"); + assertThat(result.getSummeNetto()).isEqualTo(100.0); + assertThat(result.getUst()).isEqualTo(20.0); + assertThat(result.getSummeBrutto()).isEqualTo(120.0); + } + + @Test + void setzeBezahlt_updatesRechnung_toBezahlt() { + service.setzeBezahlt(99L); + + verify(jdbcTemplate).update(anyString(), eq(99L)); + } + + // ==================== BERICHT ==================== + + @Test + void getMonatsBericht_returns12Months() { + List berichte = new ArrayList<>(); + for (int m = 1; m <= 12; m++) { + MonatsBericht b = new MonatsBericht(); + b.setMonat(m); + berichte.add(b); + } + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(2023), eq(2023), eq(2023), eq(2023))) + .thenReturn(berichte); + + List result = service.getMonatsBericht(2023); + + assertThat(result).hasSize(12); + for (int i = 0; i < 12; i++) { + assertThat(result.get(i).getMonat()).isEqualTo(i + 1); + } + } + + @Test + void getTopKunden_executesQuery_withTwoParams() { + List> reported = new ArrayList<>(); + Map row = new HashMap<>(); + row.put("id", 1L); + reported.add(row); + when(jdbcTemplate.queryForList(anyString(), eq(2024), eq(2024))).thenReturn(reported); + + List> result = service.getTopKunden(2024); + + assertThat(result).isNotNull(); + verify(jdbcTemplate).queryForList(anyString(), eq(2024), eq(2024)); + } + + // ==================== ADMIN / STATISTIK ==================== + + @Test + void getAdminStatistik_returnsAllFields() { + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(42, 7, 15, 5, 3, 1); + + Map stat = service.getAdminStatistik(); + + assertThat(stat).containsEntry("kunden", 42); + assertThat(stat).containsEntry("fahrzeuge", 7); + assertThat(stat).containsEntry("auftraege", 15); + assertThat(stat).containsEntry("auftraegeOffen", 5); + assertThat(stat).containsEntry("rechnungen", 3); + assertThat(stat).containsEntry("rechnungenOffen", 1); + assertThat(stat).containsKey("stand"); + } + + // ==================== BEHINDERTEN ABRECHNUNG / BEREINIGUNG ==================== + + @Test + void bereinigeStornierte_deletesOldStornierte() { + List ids = Arrays.asList(10L, 20L); + + when(jdbcTemplate.queryForList(anyString(), eq(Long.class))).thenReturn(ids); + + int result = service.bereinigeStornierte(); + + assertThat(result).isEqualTo(2); + verify(jdbcTemplate, times(2)).update(anyString(), eq(10L)); + verify(jdbcTemplate, times(2)).update(anyString(), eq(20L)); + } + + // ==================== RANDFAELLLET ==================== + + @Test + void neuerAuftrag_withKmStand_updatesFahrzeugKmStand() { + Integer max = 5; + List liste = new ArrayList<>(); + Auftrag a = new Auftrag(); + a.setId(10L); + a.setFahrzeugId(33L); + a.setKmStand(125000); + a.setAuftragNr("A-" + JAHR + "-0006"); + liste.add(a); + + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq("A-" + JAHR + "-%"))).thenReturn(max); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))).thenReturn(10L); + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(10L))).thenReturn(liste); + + Auftrag input = new Auftrag(); + input.setFahrzeugId(33L); + input.setKundeId(1L); + input.setKmStand(125000); + + service.neuerAuftrag(input); + + verify(jdbcTemplate).update(anyString(), eq(125000), eq(33L)); + } + + @Test + void neuePosition_afterAbgeholt_throwsException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_ABGEHOLT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.neuePosition(1L, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag A-2025-0001 ist abgeschlossen, keine Positionen mehr moeglich"); + } + + @Test + void setzeStatus_backToArbeitFromFertig_allowed() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_FERTIG); + List liste = Collections.singletonList(auftrag); + Auftrag nachher = new Auftrag(); + nachher.setId(1L); + nachher.setStatus(Auftrag.STATUS_IN_ARBEIT); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))) + .thenReturn(liste, Collections.singletonList(nachher)); + + Auftrag result = service.setzeStatus(1L, Auftrag.STATUS_IN_ARBEIT); + + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_IN_ARBEIT); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..32966c8 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..4104851 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,183 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @402e37bc (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AuftragControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 134, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.407 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 134, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:22:12 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:22:12 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:22:12 AM PIT >> INFO : Sending 1 test classes to minion +11:22:12 AM PIT >> INFO : Sent tests to minion +11:22:13 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-11:22:14 AM PIT >> INFO : Calculated coverage in 2 seconds. +11:22:14 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:22:14 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()]) took 850 ms +11:22:14 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()]) covered 7 blocks +11:22:14 AM PIT >> INFO : Created 1 mutation test units +/11:22:17 AM PIT >> INFO : Completed in 5 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 10 Killed 10 (100%) +> KILLED 10 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 2 seconds +> build mutation tests : < 1 second +> run mutation analysis : 2 seconds +-------------------------------------------------------------------------------- +> Total : 5 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()]) took 850 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 21/21 (100%) +>> 1 tests examined +>> Generated 13 mutations Killed 13 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 13 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 14.359 s +[INFO] Finished at: 2026-08-02T11:22:17+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html new file mode 100644 index 0000000..37690f7 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AuftragController.java.html @@ -0,0 +1,1324 @@ + + + + + + + + + +

AuftragController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Auftrag;
+ +4 + + + + + + +
import at.werkstatt.crm.model.AuftragPosition;
+ +5 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +6 + + + + + + +
import java.util.List;
+ +7 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +16 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +17 + + + + + + +
+ +18 + + + + + + +
@RestController
+ +19 + + + + + + +
@RequestMapping("/api/auftraege")
+ +20 + + + + + + +
public class AuftragController {
+ +21 + + + + + + +
+ +22 + + + + + + +
  private final WerkstattService werkstattService;
+ +23 + + + + + + +
+ +24 + + + + + + +
  public AuftragController(WerkstattService werkstattService) {
+ +25 + + + + + + +
    this.werkstattService = werkstattService;
+ +26 + + + + + + +
  }
+ +27 + + + + + + +
+ +28 + + + + + + +
  @GetMapping
+ +29 + + + + + + +
  public List<Auftrag> liste(@RequestParam(value = "status", required = false) String status) {
+ +30 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED
+ +
+
+
    return werkstattService.getAuftraege(status);
+ +31 + + + + + + +
  }
+ +32 + + + + + + +
+ +33 + + + + + + +
  @GetMapping("/{id}")
+ +34 + + + + + + +
  public ResponseEntity<Auftrag> einzeln(@PathVariable long id) {
+ +35 + + + + + + +
    Auftrag auftrag = werkstattService.getAuftrag(id);
+ +36 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
    if (auftrag == null) {
+ +37 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
      return ResponseEntity.notFound().build();
+ +38 + + + + + + +
    }
+ +39 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED
+ +
+
+
    return ResponseEntity.ok(auftrag);
+ +40 + + + + + + +
  }
+ +41 + + + + + + +
+ +42 + + + + + + +
  @PostMapping
+ +43 + + + + + + +
  public ResponseEntity<?> anlegen(@RequestBody Auftrag auftrag) {
+ +44 + + + + + + +
    try {
+ +45 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.neuerAuftrag(auftrag));
+ +46 + + + + + + +
    } catch (Exception e) {
+ +47 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +48 + + + + + + +
    }
+ +49 + + + + + + +
  }
+ +50 + + + + + + +
+ +51 + + + + + + +
  // Statuswechsel als PUT mit Query-Parameter, hat sich so eingebuergert
+ +52 + + + + + + +
  @PutMapping("/{id}/status")
+ +53 + + + + + + +
  public ResponseEntity<?> status(@PathVariable long id, @RequestParam("neu") String neuerStatus) {
+ +54 + + + + + + +
    try {
+ +55 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.setzeStatus(id, neuerStatus));
+ +56 + + + + + + +
    } catch (Exception e) {
+ +57 + + +1 + +1. status : replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +58 + + + + + + +
    }
+ +59 + + + + + + +
  }
+ +60 + + + + + + +
+ +61 + + + + + + +
  @PostMapping("/{id}/positionen")
+ +62 + + + + + + +
  public ResponseEntity<?> position(@PathVariable long id, @RequestBody AuftragPosition position) {
+ +63 + + + + + + +
    try {
+ +64 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.neuePosition(id, position));
+ +65 + + + + + + +
    } catch (Exception e) {
+ +66 + + +1 + +1. position : replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +67 + + + + + + +
    }
+ +68 + + + + + + +
  }
+ +69 + + + + + + +
+ +70 + + + + + + +
  @DeleteMapping("/positionen/{positionId}")
+ +71 + + + + + + +
  public ResponseEntity<?> positionLoeschen(@PathVariable long positionId) {
+ +72 + + + + + + +
    try {
+ +73 + + +1 + +1. positionLoeschen : removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED
+ +
+
+
      werkstattService.loeschePosition(positionId);
+ +74 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
      return ResponseEntity.ok().build();
+ +75 + + + + + + +
    } catch (Exception e) {
+ +76 + + +1 + +1. positionLoeschen : replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +77 + + + + + + +
    }
+ +78 + + + + + + +
  }
+ +79 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeMitLeeremStatusString()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste → KILLED + +

36 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()]
negated conditional → KILLED + +

37 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnMitGrosserId()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln → KILLED + +

45 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenSuccess()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

47 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachricht()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen → KILLED + +

55 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitLeeremNeuerStatus()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

57 + + + +

1.1
Location : status
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitExceptionOhneNachricht()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::status → KILLED + +

64 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullAuftragIdUndException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

66 + + + +

1.1
Location : position
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitLeeremTypUndException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::position → KILLED + +

73 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndException()]
removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition → KILLED + +

74 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

76 + + + +

1.1
Location : positionLoeschen
Killed by : at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndException()]
replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachricht()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenMitExceptionNurInBeschreibung()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenMitExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndException()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitException()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenMitExceptionAndererArt()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenMitGrosserIdUndException()] (11 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullAuftragIdUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitMaterialTyp()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullPosition()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitGrosserIdUndGrosserPositionId()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionSuccess()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPosition()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPosition()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschen()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenMitNullId()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenMitGrosserIdUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenMitNichtVorhandenerPosition()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenMitExceptionOhneNachricht()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullId()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (8 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenException()] (850 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitLeeremNeuerStatus()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitGrossgeschriebenemStatus()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitGrosserIdUndGrossemStatus()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatus()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitLeeremId()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusSuccess()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatus()] (9 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeMitLeeremStatusString()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInListe()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeOhneStatusFilter()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeMitStatusFilter()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInListeMitNullStatus()] (8 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionOhneNachricht()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnNotFound()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullId()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachricht()] (8 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenSuccess()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullKennzeichenUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullAbgeholtAmUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullKundeNameUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullStatusUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftrag()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenMitNullInBeschreibung()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullKundeIdUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullAngenommenAmUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullFahrzeugIdUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullFahrzeugBezeichnungUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullKmStandUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenMitNullAuftrag()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegen()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullSummeNettoUndException()] (5 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullPositionenUndException()] (6 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullFertigAmUndException()] (6 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullAuftragNrUndException()] (9 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnMitGrosserId()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzeln()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnFound()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenMitGrosserId()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitLeeremTypUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullEinzelpreisUndException()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullTypUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullMengeUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullBezeichnungUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionException()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (4 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitExceptionOhneNachricht()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionOhneNachricht()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitUngueltigemStatus()] (1 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitLeeremStatusUndException()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (2 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachricht()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndException()] (3 ms)
  • at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht()] (10 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..8cda860 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
13/13
100%
13/13
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AuftragController.java
100%
21/21
100%
13/13
100%
13/13
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..d329055 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
13/13
100%
13/13
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
21/21
100%
13/13
100%
13/13
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..7b1baee --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,16 @@ + + +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;45org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:anlegenSuccess()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControlleranlegen(Lat/werkstatt/crm/model/Auftrag;)Lorg/springframework/http/ResponseEntity;47org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachricht()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::anlegen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;36org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()]negated conditional +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;37org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:einzelnMitGrosserId()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::einzeln +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:listeMitLeeremStatusString()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/AuftragController::liste +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;64org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullAuftragIdUndException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerposition(JLat/werkstatt/crm/model/AuftragPosition;)Lorg/springframework/http/ResponseEntity;66org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitLeeremTypUndException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::position +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;73org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndException()]removed call to at/werkstatt/crm/service/WerkstattService::loeschePosition +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionLoeschenSuccess()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerpositionLoeschen(J)Lorg/springframework/http/ResponseEntity;76org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:positionMitNullIdInPositionLoeschenMitNullIdUndException()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::positionLoeschen +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;55org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator102at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitLeeremNeuerStatus()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status +AuftragController.javaat.werkstatt.crm.controller.AuftragControllerstatus(JLjava/lang/String;)Lorg/springframework/http/ResponseEntity;57org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.AuftragControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AuftragControllerGeneratedTest]/[method:statusMitExceptionOhneNachricht()]replaced return value with null for at/werkstatt/crm/controller/AuftragController::status + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml new file mode 100644 index 0000000..f40f29b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AuftragControllerGeneratedTest.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt new file mode 100644 index 0000000..0db2072 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AuftragControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AuftragControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 134, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.407 s -- in at.werkstatt.crm.gen.AuftragControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java new file mode 100644 index 0000000..219442c --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-auftragcontroller/repaired/AuftragControllerGeneratedTest.java @@ -0,0 +1,1981 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.AuftragController; +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) +class AuftragControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + @InjectMocks + private AuftragController controller; + + private Auftrag auftrag; + private AuftragPosition position; + + @BeforeEach + void setUp() { + auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2024-001"); + auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN); + auftrag.setBeschreibung("Reparatur"); + auftrag.setKundeId(10L); + auftrag.setFahrzeugId(20L); + + position = new AuftragPosition(); + position.setId(100L); + position.setTyp(AuftragPosition.TYP_ARBEIT); + position.setBezeichnung("Bremsen gewechselt"); + position.setMenge(1.0); + position.setEinzelpreis(150.0); + } + + @Test + void listeMitStatusFilter() { + // Arrange + List expected = Arrays.asList(auftrag); + when(werkstattService.getAuftraege("ANGENOMMEN")).thenReturn(expected); + + // Act + List result = controller.liste("ANGENOMMEN"); + + // Assert + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAuftraege("ANGENOMMEN"); + } + + @Test + void listeOhneStatusFilter() { + // Arrange + List expected = Arrays.asList(auftrag); + when(werkstattService.getAuftraege(null)).thenReturn(expected); + + // Act + List result = controller.liste(null); + + // Assert + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAuftraege(null); + } + + @Test + void einzelnFound() { + // Arrange + when(werkstattService.getAuftrag(1L)).thenReturn(auftrag); + + // Act + var response = controller.einzeln(1L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).getAuftrag(1L); + } + + @Test + void einzelnNotFound() { + // Arrange + when(werkstattService.getAuftrag(999L)).thenReturn(null); + + // Act + var response = controller.einzeln(999L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(999L); + } + + @Test + void anlegenSuccess() { + // Arrange + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenReturn(auftrag); + + // Act + var response = controller.anlegen(auftrag); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).neuerAuftrag(auftrag); + } + + @Test + void anlegenException() { + // Arrange + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenThrow(new RuntimeException("DB error")); + + // Act + var response = controller.anlegen(auftrag); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("DB error"); + verify(werkstattService).neuerAuftrag(auftrag); + } + + @Test + void statusSuccess() { + // Arrange + when(werkstattService.setzeStatus(1L, "IN_ARBEIT")).thenReturn(auftrag); + + // Act + var response = controller.status(1L, "IN_ARBEIT"); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(1L, "IN_ARBEIT"); + } + + @Test + void statusException() { + // Arrange + when(werkstattService.setzeStatus(1L, "UNGUELTIG")).thenThrow(new IllegalArgumentException("Invalid status")); + + // Act + var response = controller.status(1L, "UNGUELTIG"); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Invalid status"); + verify(werkstattService).setzeStatus(1L, "UNGUELTIG"); + } + + @Test + void positionSuccess() { + // Arrange + when(werkstattService.neuePosition(1L, position)).thenReturn(position); + + // Act + var response = controller.position(1L, position); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(position); + verify(werkstattService).neuePosition(1L, position); + } + + @Test + void positionException() { + // Arrange + when(werkstattService.neuePosition(1L, position)).thenThrow(new RuntimeException("Position failed")); + + // Act + var response = controller.position(1L, position); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position failed"); + verify(werkstattService).neuePosition(1L, position); + } + + @Test + void positionLoeschenSuccess() { + // Arrange + doNothing().when(werkstattService).loeschePosition(100L); + + // Act + var response = controller.positionLoeschen(100L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(100L); + } + + @Test + void positionLoeschenException() { + // Arrange + doThrow(new RuntimeException("Delete failed")).when(werkstattService).loeschePosition(100L); + + // Act + var response = controller.positionLoeschen(100L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Delete failed"); + verify(werkstattService).loeschePosition(100L); + } + + @Test + void statusMitLeeremNeuerStatus() { + // Arrange + when(werkstattService.setzeStatus(1L, "")).thenReturn(auftrag); + + // Act + var response = controller.status(1L, ""); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(1L, ""); + } + + @Test + void anlegenMitNullAuftrag() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenReturn(auftrag); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullPosition() { + // Arrange + when(werkstattService.neuePosition(1L, null)).thenReturn(null); + + // Act + var response = controller.position(1L, null); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(1L, null); + } + + @Test + void positionLoeschenMitNullId() { + // Arrange + doThrow(new IllegalArgumentException("Position ID must not be null")).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position ID must not be null"); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void statusMitUngueltigemStatus() { + // Arrange + when(werkstattService.setzeStatus(1L, "UNGUELTIG")).thenThrow(new IllegalArgumentException("Invalid status: UNGUELTIG")); + + // Act + var response = controller.status(1L, "UNGUELTIG"); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Invalid status: UNGUELTIG"); + verify(werkstattService).setzeStatus(1L, "UNGUELTIG"); + } + + @Test + void anlegenMitExceptionAndererArt() { + // Arrange + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenThrow(new IllegalStateException("Business rule violation")); + + // Act + var response = controller.anlegen(auftrag); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Business rule violation"); + verify(werkstattService).neuerAuftrag(auftrag); + } + + @Test + void positionLoeschenMitNichtVorhandenerPosition() { + // Arrange + doThrow(new RuntimeException("Position not found")).when(werkstattService).loeschePosition(999L); + + // Act + var response = controller.positionLoeschen(999L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position not found"); + verify(werkstattService).loeschePosition(999L); + } + + @Test + void statusMitGrossgeschriebenemStatus() { + // Arrange + when(werkstattService.setzeStatus(1L, "ANGENOMMEN")).thenReturn(auftrag); + + // Act + var response = controller.status(1L, "ANGENOMMEN"); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(1L, "ANGENOMMEN"); + } + + @Test + void positionMitMaterialTyp() { + // Arrange + AuftragPosition materialPosition = new AuftragPosition(); + materialPosition.setTyp(AuftragPosition.TYP_MATERIAL); + materialPosition.setBezeichnung("Bremsbelag Satz"); + materialPosition.setMenge(2.0); + materialPosition.setEinzelpreis(45.50); + + when(werkstattService.neuePosition(1L, materialPosition)).thenReturn(materialPosition); + + // Act + var response = controller.position(1L, materialPosition); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(materialPosition); + verify(werkstattService).neuePosition(1L, materialPosition); + } + + @Test + void listeMitLeeremStatusString() { + // Arrange + when(werkstattService.getAuftraege("")).thenReturn(Arrays.asList(auftrag)); + + // Act + var result = controller.liste(""); + + // Assert + assertThat(result).hasSize(1); + assertThat(result.get(0)).isEqualTo(auftrag); + verify(werkstattService).getAuftraege(""); + } + + @Test + void einzelnMitGrosserId() { + // Arrange + when(werkstattService.getAuftrag(Long.MAX_VALUE)).thenReturn(auftrag); + + // Act + var response = controller.einzeln(Long.MAX_VALUE); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).getAuftrag(Long.MAX_VALUE); + } + + @Test + void anlegenMitNullInBeschreibung() { + // Arrange + Auftrag auftragOhneBeschreibung = new Auftrag(); + auftragOhneBeschreibung.setBeschreibung(null); + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenReturn(auftragOhneBeschreibung); + + // Act + var response = controller.anlegen(auftragOhneBeschreibung); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getBeschreibung()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneBeschreibung); + } + + @Test + void positionLoeschenMitGrosserId() { + // Arrange + doNothing().when(werkstattService).loeschePosition(Long.MAX_VALUE); + + // Act + var response = controller.positionLoeschen(Long.MAX_VALUE); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + verify(werkstattService).loeschePosition(Long.MAX_VALUE); + } + + @Test + void statusMitLeeremId() { + // Arrange + when(werkstattService.setzeStatus(0L, "ANGENOMMEN")).thenReturn(auftrag); + + // Act + var response = controller.status(0L, "ANGENOMMEN"); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(0L, "ANGENOMMEN"); + } + + @Test + void positionMitNullIdInPosition() { + // Arrange + AuftragPosition positionOhneId = new AuftragPosition(); + positionOhneId.setId(null); + when(werkstattService.neuePosition(1L, positionOhneId)).thenReturn(positionOhneId); + + // Act + var response = controller.position(1L, positionOhneId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((AuftragPosition) response.getBody()).getId()).isNull(); + verify(werkstattService).neuePosition(1L, positionOhneId); + } + + @Test + void anlegenMitExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuerAuftrag(any(Auftrag.class))).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(auftrag); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(auftrag); + } + + @Test + void statusMitExceptionOhneNachricht() { + // Arrange + when(werkstattService.setzeStatus(1L, "IN_ARBEIT")).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(1L, "IN_ARBEIT"); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(1L, "IN_ARBEIT"); + } + + @Test + void positionLoeschenMitExceptionOhneNachricht() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(100L); + + // Act + var response = controller.positionLoeschen(100L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(100L); + } + + @Test + void positionMitExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuePosition(1L, position)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(1L, position); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(1L, position); + } + + @Test + void anlegenMitExceptionNurInBeschreibung() { + // Arrange + Auftrag auftragMitBeschreibung = new Auftrag(); + auftragMitBeschreibung.setBeschreibung("A"); + when(werkstattService.neuerAuftrag(auftragMitBeschreibung)).thenThrow(new RuntimeException("Validation failed")); + + // Act + var response = controller.anlegen(auftragMitBeschreibung); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Validation failed"); + verify(werkstattService).neuerAuftrag(auftragMitBeschreibung); + } + + @Test + void statusMitGrosserIdUndGrossemStatus() { + // Arrange + when(werkstattService.setzeStatus(Long.MAX_VALUE, "FERTIG")).thenReturn(auftrag); + + // Act + var response = controller.status(Long.MAX_VALUE, "FERTIG"); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(Long.MAX_VALUE, "FERTIG"); + } + + @Test + void positionMitGrosserIdUndGrosserPositionId() { + // Arrange + AuftragPosition positionMitGrosserId = new AuftragPosition(); + positionMitGrosserId.setId(Long.MAX_VALUE); + when(werkstattService.neuePosition(Long.MAX_VALUE, positionMitGrosserId)).thenReturn(positionMitGrosserId); + + // Act + var response = controller.position(Long.MAX_VALUE, positionMitGrosserId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((AuftragPosition) response.getBody()).getId()).isEqualTo(Long.MAX_VALUE); + verify(werkstattService).neuePosition(Long.MAX_VALUE, positionMitGrosserId); + } + + @Test + void positionLoeschenMitGrosserIdUndException() { + // Arrange + doThrow(new RuntimeException("DB constraint violation")).when(werkstattService).loeschePosition(Long.MAX_VALUE); + + // Act + var response = controller.positionLoeschen(Long.MAX_VALUE); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("DB constraint violation"); + verify(werkstattService).loeschePosition(Long.MAX_VALUE); + } + + @Test + void statusMitLeeremStatusUndException() { + // Arrange + when(werkstattService.setzeStatus(1L, "")).thenThrow(new IllegalArgumentException("Status cannot be empty")); + + // Act + var response = controller.status(1L, ""); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Status cannot be empty"); + verify(werkstattService).setzeStatus(1L, ""); + } + + @Test + void positionMitLeeremTypUndException() { + // Arrange + AuftragPosition positionOhneTyp = new AuftragPosition(); + positionOhneTyp.setTyp(""); + when(werkstattService.neuePosition(1L, positionOhneTyp)).thenThrow(new IllegalArgumentException("Typ is required")); + + // Act + var response = controller.position(1L, positionOhneTyp); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Typ is required"); + verify(werkstattService).neuePosition(1L, positionOhneTyp); + } + + @Test + void anlegenMitGrosserIdUndException() { + // Arrange + Auftrag auftragMitGrosserId = new Auftrag(); + auftragMitGrosserId.setId(Long.MAX_VALUE); + when(werkstattService.neuerAuftrag(auftragMitGrosserId)).thenThrow(new RuntimeException("ID too large")); + + // Act + var response = controller.anlegen(auftragMitGrosserId); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("ID too large"); + verify(werkstattService).neuerAuftrag(auftragMitGrosserId); + } + + @Test + void positionMitNullMengeUndException() { + // Arrange + AuftragPosition positionMitNullMenge = new AuftragPosition(); + positionMitNullMenge.setMenge(0.0); + when(werkstattService.neuePosition(1L, positionMitNullMenge)).thenThrow(new IllegalArgumentException("Menge must be > 0")); + + // Act + var response = controller.position(1L, positionMitNullMenge); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Menge must be > 0"); + verify(werkstattService).neuePosition(1L, positionMitNullMenge); + } + + @Test + void positionMitNullEinzelpreisUndException() { + // Arrange + AuftragPosition positionMitNullPreis = new AuftragPosition(); + positionMitNullPreis.setEinzelpreis(0.0); + when(werkstattService.neuePosition(1L, positionMitNullPreis)).thenThrow(new IllegalArgumentException("Einzelpreis must be > 0")); + + // Act + var response = controller.position(1L, positionMitNullPreis); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Einzelpreis must be > 0"); + verify(werkstattService).neuePosition(1L, positionMitNullPreis); + } + + @Test + void positionMitNullBezeichnungUndException() { + // Arrange + AuftragPosition positionOhneBezeichnung = new AuftragPosition(); + positionOhneBezeichnung.setBezeichnung(null); + when(werkstattService.neuePosition(1L, positionOhneBezeichnung)).thenThrow(new IllegalArgumentException("Bezeichnung is required")); + + // Act + var response = controller.position(1L, positionOhneBezeichnung); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Bezeichnung is required"); + verify(werkstattService).neuePosition(1L, positionOhneBezeichnung); + } + + @Test + void positionMitNullTypUndException() { + // Arrange + AuftragPosition positionOhneTyp = new AuftragPosition(); + positionOhneTyp.setTyp(null); + when(werkstattService.neuePosition(1L, positionOhneTyp)).thenThrow(new IllegalArgumentException("Typ is required")); + + // Act + var response = controller.position(1L, positionOhneTyp); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Typ is required"); + verify(werkstattService).neuePosition(1L, positionOhneTyp); + } + + @Test + void positionMitNullAuftragIdUndException() { + // Arrange + AuftragPosition positionOhneAuftragId = new AuftragPosition(); + positionOhneAuftragId.setAuftragId(null); + when(werkstattService.neuePosition(1L, positionOhneAuftragId)).thenReturn(positionOhneAuftragId); + + // Act + var response = controller.position(1L, positionOhneAuftragId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((AuftragPosition) response.getBody()).getAuftragId()).isNull(); + verify(werkstattService).neuePosition(1L, positionOhneAuftragId); + } + + @Test + void positionMitNullKundeIdUndException() { + // Arrange + Auftrag auftragOhneKundeId = new Auftrag(); + auftragOhneKundeId.setKundeId(null); + when(werkstattService.neuerAuftrag(auftragOhneKundeId)).thenReturn(auftragOhneKundeId); + + // Act + var response = controller.anlegen(auftragOhneKundeId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getKundeId()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneKundeId); + } + + @Test + void positionMitNullFahrzeugIdUndException() { + // Arrange + Auftrag auftragOhneFahrzeugId = new Auftrag(); + auftragOhneFahrzeugId.setFahrzeugId(null); + when(werkstattService.neuerAuftrag(auftragOhneFahrzeugId)).thenReturn(auftragOhneFahrzeugId); + + // Act + var response = controller.anlegen(auftragOhneFahrzeugId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getFahrzeugId()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneFahrzeugId); + } + + @Test + void positionMitNullStatusUndException() { + // Arrange + Auftrag auftragOhneStatus = new Auftrag(); + auftragOhneStatus.setStatus(null); + when(werkstattService.neuerAuftrag(auftragOhneStatus)).thenReturn(auftragOhneStatus); + + // Act + var response = controller.anlegen(auftragOhneStatus); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getStatus()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneStatus); + } + + @Test + void positionMitNullAuftragNrUndException() { + // Arrange + Auftrag auftragOhneAuftragNr = new Auftrag(); + auftragOhneAuftragNr.setAuftragNr(null); + when(werkstattService.neuerAuftrag(auftragOhneAuftragNr)).thenReturn(auftragOhneAuftragNr); + + // Act + var response = controller.anlegen(auftragOhneAuftragNr); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getAuftragNr()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneAuftragNr); + } + + @Test + void positionMitNullKundeNameUndException() { + // Arrange + Auftrag auftragOhneKundeName = new Auftrag(); + auftragOhneKundeName.setKundeName(null); + when(werkstattService.neuerAuftrag(auftragOhneKundeName)).thenReturn(auftragOhneKundeName); + + // Act + var response = controller.anlegen(auftragOhneKundeName); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getKundeName()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneKundeName); + } + + @Test + void positionMitNullKennzeichenUndException() { + // Arrange + Auftrag auftragOhneKennzeichen = new Auftrag(); + auftragOhneKennzeichen.setKennzeichen(null); + when(werkstattService.neuerAuftrag(auftragOhneKennzeichen)).thenReturn(auftragOhneKennzeichen); + + // Act + var response = controller.anlegen(auftragOhneKennzeichen); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getKennzeichen()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneKennzeichen); + } + + @Test + void positionMitNullFahrzeugBezeichnungUndException() { + // Arrange + Auftrag auftragOhneFahrzeugBezeichnung = new Auftrag(); + auftragOhneFahrzeugBezeichnung.setFahrzeugBezeichnung(null); + when(werkstattService.neuerAuftrag(auftragOhneFahrzeugBezeichnung)).thenReturn(auftragOhneFahrzeugBezeichnung); + + // Act + var response = controller.anlegen(auftragOhneFahrzeugBezeichnung); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getFahrzeugBezeichnung()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneFahrzeugBezeichnung); + } + + @Test + void positionMitNullPositionenUndException() { + // Arrange + Auftrag auftragOhnePositionen = new Auftrag(); + auftragOhnePositionen.setPositionen(null); + when(werkstattService.neuerAuftrag(auftragOhnePositionen)).thenReturn(auftragOhnePositionen); + + // Act + var response = controller.anlegen(auftragOhnePositionen); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getPositionen()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhnePositionen); + } + + @Test + void positionMitNullKmStandUndException() { + // Arrange + Auftrag auftragOhneKmStand = new Auftrag(); + auftragOhneKmStand.setKmStand(null); + when(werkstattService.neuerAuftrag(auftragOhneKmStand)).thenReturn(auftragOhneKmStand); + + // Act + var response = controller.anlegen(auftragOhneKmStand); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getKmStand()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneKmStand); + } + + @Test + void positionMitNullAngenommenAmUndException() { + // Arrange + Auftrag auftragOhneAngenommenAm = new Auftrag(); + auftragOhneAngenommenAm.setAngenommenAm(null); + when(werkstattService.neuerAuftrag(auftragOhneAngenommenAm)).thenReturn(auftragOhneAngenommenAm); + + // Act + var response = controller.anlegen(auftragOhneAngenommenAm); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getAngenommenAm()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneAngenommenAm); + } + + @Test + void positionMitNullFertigAmUndException() { + // Arrange + Auftrag auftragOhneFertigAm = new Auftrag(); + auftragOhneFertigAm.setFertigAm(null); + when(werkstattService.neuerAuftrag(auftragOhneFertigAm)).thenReturn(auftragOhneFertigAm); + + // Act + var response = controller.anlegen(auftragOhneFertigAm); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getFertigAm()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneFertigAm); + } + + @Test + void positionMitNullAbgeholtAmUndException() { + // Arrange + Auftrag auftragOhneAbgeholtAm = new Auftrag(); + auftragOhneAbgeholtAm.setAbgeholtAm(null); + when(werkstattService.neuerAuftrag(auftragOhneAbgeholtAm)).thenReturn(auftragOhneAbgeholtAm); + + // Act + var response = controller.anlegen(auftragOhneAbgeholtAm); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getAbgeholtAm()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneAbgeholtAm); + } + + @Test + void positionMitNullSummeNettoUndException() { + // Arrange + Auftrag auftragOhneSummeNetto = new Auftrag(); + when(werkstattService.neuerAuftrag(auftragOhneSummeNetto)).thenReturn(auftragOhneSummeNetto); + + // Act + var response = controller.anlegen(auftragOhneSummeNetto); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getSummeNetto()).isEqualTo(0.0); + verify(werkstattService).neuerAuftrag(auftragOhneSummeNetto); + } + + @Test + void positionMitNullIdUndException() { + // Arrange + AuftragPosition positionOhneId = new AuftragPosition(); + positionOhneId.setId(null); + when(werkstattService.neuePosition(1L, positionOhneId)).thenReturn(positionOhneId); + + // Act + var response = controller.position(1L, positionOhneId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((AuftragPosition) response.getBody()).getId()).isNull(); + verify(werkstattService).neuePosition(1L, positionOhneId); + } + + @Test + void positionMitNullIdInPositionLoeschen() { + // Arrange + doThrow(new IllegalArgumentException("Position ID must not be null")).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position ID must not be null"); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInStatus() { + // Arrange + when(werkstattService.setzeStatus(0L, "ANGENOMMEN")).thenReturn(auftrag); + + // Act + var response = controller.status(0L, "ANGENOMMEN"); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(0L, "ANGENOMMEN"); + } + + @Test + void positionMitNullIdInAnlegen() { + // Arrange + Auftrag auftragOhneId = new Auftrag(); + auftragOhneId.setId(null); + when(werkstattService.neuerAuftrag(auftragOhneId)).thenReturn(auftragOhneId); + + // Act + var response = controller.anlegen(auftragOhneId); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(((Auftrag) response.getBody()).getId()).isNull(); + verify(werkstattService).neuerAuftrag(auftragOhneId); + } + + @Test + void positionMitNullIdInEinzeln() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(auftrag); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListe() { + // Arrange + when(werkstattService.getAuftraege(null)).thenReturn(Arrays.asList(auftrag)); + + // Act + var result = controller.liste(null); + + // Assert + assertThat(result).hasSize(1); + assertThat(result.get(0)).isEqualTo(auftrag); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitException() { + // Arrange + when(werkstattService.setzeStatus(0L, "")).thenThrow(new IllegalArgumentException("Status cannot be empty")); + + // Act + var response = controller.status(0L, ""); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Status cannot be empty"); + verify(werkstattService).setzeStatus(0L, ""); + } + + @Test + void positionMitNullIdInPositionMitException() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new IllegalArgumentException("Invalid input")); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Invalid input"); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitException() { + // Arrange + doThrow(new IllegalArgumentException("Position ID must not be null")).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position ID must not be null"); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitException() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new IllegalArgumentException("Auftrag must not be null")); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Auftrag must not be null"); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitException() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitException() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException("Database error")); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatus() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenReturn(auftrag); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(auftrag); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPosition() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenReturn(null); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullId() { + // Arrange + doThrow(new IllegalArgumentException("Position ID must not be null")).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position ID must not be null"); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftrag() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenReturn(null); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullId() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatus() { + // Arrange + when(werkstattService.getAuftraege(null)).thenReturn(Arrays.asList(auftrag)); + + // Act + var result = controller.liste(null); + + // Assert + assertThat(result).hasSize(1); + assertThat(result.get(0)).isEqualTo(auftrag); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndException() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new IllegalArgumentException("Status cannot be null")); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Status cannot be null"); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndException() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new IllegalArgumentException("Invalid input")); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Invalid input"); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndException() { + // Arrange + doThrow(new IllegalArgumentException("Position ID must not be null")).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Position ID must not be null"); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndException() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new IllegalArgumentException("Auftrag must not be null")); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo("Auftrag must not be null"); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndException() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndException() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException("Database error")); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionOhneNachricht() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachricht() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new IllegalArgumentException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachricht() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new IllegalArgumentException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachricht() { + // Arrange + doThrow(new IllegalArgumentException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachricht() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new IllegalArgumentException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachricht() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachricht() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new IllegalArgumentException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(IllegalArgumentException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndException() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndException() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndException() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndException() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndException() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndException() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachricht() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } + + @Test + void positionMitNullIdInStatusMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.setzeStatus(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.status(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeStatus(0L, null); + } + + @Test + void positionMitNullIdInPositionMitNullPositionUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.neuePosition(0L, null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.position(0L, null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuePosition(0L, null); + } + + @Test + void positionMitNullIdInPositionLoeschenMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + doThrow(new RuntimeException()).when(werkstattService).loeschePosition(0L); + + // Act + var response = controller.positionLoeschen(0L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(0L); + } + + @Test + void positionMitNullIdInAnlegenMitNullAuftragUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.neuerAuftrag(null)).thenThrow(new RuntimeException()); + + // Act + var response = controller.anlegen(null); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).neuerAuftrag(null); + } + + @Test + void positionMitNullIdInEinzelnMitNullIdUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.getAuftrag(0L)).thenReturn(null); + + // Act + var response = controller.einzeln(0L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getAuftrag(0L); + } + + @Test + void positionMitNullIdInListeMitNullStatusUndExceptionMitLeeremNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndExceptionOhneNachrichtUndException() { + // Arrange + when(werkstattService.getAuftraege(null)).thenThrow(new RuntimeException()); + + // Act + Throwable thrown = catchThrowable(() -> controller.liste(null)); + + // Assert + assertThat(thrown).isInstanceOf(RuntimeException.class); + verify(werkstattService).getAuftraege(null); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..fcc1989 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..b19c76b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/maven-test.log @@ -0,0 +1,201 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @501edcf1 (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.KundenControllerGeneratedTest +[INFO] Running GET /api/kunden/{id}/fahrzeuge - vehicles +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.300 s -- in GET /api/kunden/{id}/fahrzeuge - vehicles +[INFO] Running GET /api/kunden/{id} - single +[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.057 s -- in GET /api/kunden/{id} - single +[INFO] Running DELETE /api/kunden/{id} - delete +[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 s -- in DELETE /api/kunden/{id} - delete +[INFO] Running PUT /api/kunden/{id} - update +[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 s -- in PUT /api/kunden/{id} - update +[INFO] Running POST /api/kunden - create +[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s -- in POST /api/kunden - create +[INFO] Running GET /api/kunden - list +[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.079 s -- in GET /api/kunden - list +[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.529 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:22:25 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:22:25 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:22:25 AM PIT >> INFO : Sending 7 test classes to minion +11:22:25 AM PIT >> INFO : Sent tests to minion +11:22:26 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/-\|/-\11:22:26 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:22:26 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:22:26 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:VehiclesTests]/[method:returnsVehiclesForKunde()]) took 561 ms +11:22:26 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:trimsSucheParameter()]) covered 9 blocks +11:22:26 AM PIT >> INFO : Created 1 mutation test units +/11:22:28 AM PIT >> INFO : Completed in 3 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 7 Killed 7 (100%) +> KILLED 7 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 3 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:VehiclesTests]/[method:returnsVehiclesForKunde()]) took 561 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:trimsSucheParameter()]) covered 9 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 21/21 (100%) +>> 7 tests examined +>> Generated 17 mutations Killed 17 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 21 tests (1.24 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 9.804 s +[INFO] Finished at: 2026-08-02T11:22:28+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html new file mode 100644 index 0000000..3f023d0 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/KundenController.java.html @@ -0,0 +1,1326 @@ + + + + + + + + + +

KundenController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Fahrzeug;
+ +4 + + + + + + +
import at.werkstatt.crm.model.Kunde;
+ +5 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +6 + + + + + + +
import java.util.List;
+ +7 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.DeleteMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +13 + + + + + + +
import org.springframework.web.bind.annotation.RequestBody;
+ +14 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +15 + + + + + + +
import org.springframework.web.bind.annotation.RequestParam;
+ +16 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +17 + + + + + + +
+ +18 + + + + + + +
@RestController
+ +19 + + + + + + +
@RequestMapping("/api/kunden")
+ +20 + + + + + + +
public class KundenController {
+ +21 + + + + + + +
+ +22 + + + + + + +
  private final WerkstattService werkstattService;
+ +23 + + + + + + +
+ +24 + + + + + + +
  public KundenController(WerkstattService werkstattService) {
+ +25 + + + + + + +
    this.werkstattService = werkstattService;
+ +26 + + + + + + +
  }
+ +27 + + + + + + +
+ +28 + + + + + + +
  @GetMapping
+ +29 + + + + + + +
  public List<Kunde> liste(@RequestParam(value = "suche", required = false) String suche) {
+ +30 + + +3 + +1. liste : negated conditional → KILLED
+2. liste : changed conditional boundary → KILLED
+3. liste : negated conditional → KILLED
+ +
+
+
    if (suche != null && suche.trim().length() > 0) {
+ +31 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
      return werkstattService.sucheKunden(suche.trim());
+ +32 + + + + + + +
    }
+ +33 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED
+ +
+
+
    return werkstattService.getAlleKunden();
+ +34 + + + + + + +
  }
+ +35 + + + + + + +
+ +36 + + + + + + +
  @GetMapping("/{id}")
+ +37 + + + + + + +
  public ResponseEntity<Kunde> einzeln(@PathVariable long id) {
+ +38 + + + + + + +
    Kunde kunde = werkstattService.getKunde(id);
+ +39 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
    if (kunde == null) {
+ +40 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
      return ResponseEntity.notFound().build();
+ +41 + + + + + + +
    }
+ +42 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED
+ +
+
+
    return ResponseEntity.ok(kunde);
+ +43 + + + + + + +
  }
+ +44 + + + + + + +
+ +45 + + + + + + +
  @GetMapping("/{id}/fahrzeuge")
+ +46 + + + + + + +
  public List<Fahrzeug> fahrzeuge(@PathVariable long id) {
+ +47 + + +1 + +1. fahrzeuge : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED
+ +
+
+
    return werkstattService.getFahrzeugeZuKunde(id);
+ +48 + + + + + + +
  }
+ +49 + + + + + + +
+ +50 + + + + + + +
  @PostMapping
+ +51 + + + + + + +
  public Kunde anlegen(@RequestBody Kunde kunde) {
+ +52 + + + + + + +
    // keine Validierung, das Frontend schickt schon das Richtige
+ +53 + + +1 + +1. anlegen : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
    kunde.setId(null);
+ +54 + + +1 + +1. anlegen : replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED
+ +
+
+
    return werkstattService.speichereKunde(kunde);
+ +55 + + + + + + +
  }
+ +56 + + + + + + +
+ +57 + + + + + + +
  @PutMapping("/{id}")
+ +58 + + + + + + +
  public ResponseEntity<?> aendern(@PathVariable long id, @RequestBody Kunde kunde) {
+ +59 + + + + + + +
    try {
+ +60 + + +1 + +1. aendern : removed call to at/werkstatt/crm/model/Kunde::setId → KILLED
+ +
+
+
      kunde.setId(id);
+ +61 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.speichereKunde(kunde));
+ +62 + + + + + + +
    } catch (Exception e) {
+ +63 + + +1 + +1. aendern : replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +64 + + + + + + +
    }
+ +65 + + + + + + +
  }
+ +66 + + + + + + +
+ +67 + + + + + + +
  @DeleteMapping("/{id}")
+ +68 + + + + + + +
  public ResponseEntity<?> loeschen(@PathVariable long id) {
+ +69 + + + + + + +
    try {
+ +70 + + +1 + +1. loeschen : removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED
+ +
+
+
      werkstattService.loescheKunde(id);
+ +71 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
      return ResponseEntity.ok().build();
+ +72 + + + + + + +
    } catch (Exception e) {
+ +73 + + + + + + +
      // Meldung 1:1 zum Client, hilft beim Support-Telefonat
+ +74 + + +1 + +1. loeschen : replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +75 + + + + + + +
    }
+ +76 + + + + + + +
  }
+ +77 + + + + + + +
}

Mutations

30 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()]
negated conditional → KILLED +

2.2
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[test-template:returnsAllKundenWhenSucheIsEmpty(java.lang.String)]/[test-template-invocation:#2]
changed conditional boundary → KILLED +

3.3
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()]
negated conditional → KILLED + +

31 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

33 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[test-template:returnsAllKundenWhenSucheIsEmpty(java.lang.String)]/[test-template-invocation:#2]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste → KILLED + +

39 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsKundeWhenFound()]
negated conditional → KILLED + +

40 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsNotFoundWhenKundeIsNull()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

42 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsKundeWhenFound()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln → KILLED + +

47 + + + +

1.1
Location : fahrzeuge
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:VehiclesTests]/[method:returnsVehiclesForKunde()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge → KILLED + +

53 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:CreateTests]/[method:createsNewKunde()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

54 + + + +

1.1
Location : anlegen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:CreateTests]/[method:createsNewKunde()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen → KILLED + +

60 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:setsIdBeforeSaving()]
removed call to at/werkstatt/crm/model/Kunde::setId → KILLED + +

61 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:returnsUpdatedKundeOnSuccess()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

63 + + + +

1.1
Location : aendern
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:returnsInternalServerErrorOnException()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern → KILLED + +

70 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsOkOnSuccess()]
removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde → KILLED + +

71 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsOkOnSuccess()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

74 + + + +

1.1
Location : loeschen
Killed by : at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsInternalServerErrorOnException()]
replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[test-template:returnsAllKundenWhenSucheIsEmpty(java.lang.String)]/[test-template-invocation:#2] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:trimsSucheParameter()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:returnsInternalServerErrorOnException()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:returnsUpdatedKundeOnSuccess()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:setsIdBeforeSaving()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:CreateTests]/[method:createsNewKunde()] (3 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsInternalServerErrorOnException()] (6 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsOkOnSuccess()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsAllKundenWhenNoSucheParam()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[test-template:returnsAllKundenWhenSucheIsEmpty(java.lang.String)]/[test-template-invocation:#1] (9 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsNotFoundWhenKundeIsNull()] (10 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsKundeWhenFound()] (1 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:VehiclesTests]/[method:returnsEmptyListWhenNoVehicles()] (2 ms)
  • at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:VehiclesTests]/[method:returnsVehiclesForKunde()] (561 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..893498f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
17/17
100%
17/17
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
KundenController.java
100%
21/21
100%
17/17
100%
17/17
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..e38240b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
21/21
100%
17/17
100%
17/17
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
21/21
100%
17/17
100%
17/17
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..681384c --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,20 @@ + + +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;60org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator61at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:setsIdBeforeSaving()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;61org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator154at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:returnsUpdatedKundeOnSuccess()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleraendern(JLat/werkstatt/crm/model/Kunde;)Lorg/springframework/http/ResponseEntity;63org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator278at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:UpdateTests]/[method:returnsInternalServerErrorOnException()]replaced return value with null for at/werkstatt/crm/controller/KundenController::aendern +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;53org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator50at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:CreateTests]/[method:createsNewKunde()]removed call to at/werkstatt/crm/model/Kunde::setId +KundenController.javaat.werkstatt.crm.controller.KundenControlleranlegen(Lat/werkstatt/crm/model/Kunde;)Lat/werkstatt/crm/model/Kunde;54org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator122at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:CreateTests]/[method:createsNewKunde()]replaced return value with null for at/werkstatt/crm/controller/KundenController::anlegen +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;39org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsKundeWhenFound()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;40org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsNotFoundWhenKundeIsNull()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllereinzeln(J)Lorg/springframework/http/ResponseEntity;42org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:SingleTests]/[method:returnsKundeWhenFound()]replaced return value with null for at/werkstatt/crm/controller/KundenController::einzeln +KundenController.javaat.werkstatt.crm.controller.KundenControllerfahrzeuge(J)Ljava/util/List;47org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator71at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:VehiclesTests]/[method:returnsVehiclesForKunde()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::fahrzeuge +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[test-template:returnsAllKundenWhenSucheIsEmpty(java.lang.String)]/[test-template-invocation:#2]changed conditional boundary +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator40at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;30org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator83at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()]negated conditional +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;31org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator166at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[method:returnsSearchedKundenWhenSucheProvided()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerliste(Ljava/lang/String;)Ljava/util/List;33org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator238at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:ListTests]/[test-template:returnsAllKundenWhenSucheIsEmpty(java.lang.String)]/[test-template-invocation:#2]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/KundenController::liste +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;70org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator60at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsOkOnSuccess()]removed call to at/werkstatt/crm/service/WerkstattService::loescheKunde +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;71org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator123at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsOkOnSuccess()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen +KundenController.javaat.werkstatt.crm.controller.KundenControllerloeschen(J)Lorg/springframework/http/ResponseEntity;74org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator247at.werkstatt.crm.gen.KundenControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.KundenControllerGeneratedTest]/[nested-class:DeleteTests]/[method:returnsInternalServerErrorOnException()]replaced return value with null for at/werkstatt/crm/controller/KundenController::loeschen + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml new file mode 100644 index 0000000..37f432d --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.KundenControllerGeneratedTest.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt new file mode 100644 index 0000000..5e2914b --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.KundenControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.KundenControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.529 s -- in at.werkstatt.crm.gen.KundenControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java new file mode 100644 index 0000000..1f83f82 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-kundencontroller/repaired/KundenControllerGeneratedTest.java @@ -0,0 +1,347 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.KundenController; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.NullAndEmptySource; +import org.junit.jupiter.params.provider.ValueSource; +import org.mockito.ArgumentCaptor; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.http.ResponseEntity; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.*; + +class KundenControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private KundenController controller; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + controller = new KundenController(werkstattService); + } + + // --- @GetMapping (list) tests --- + @Nested + @DisplayName("GET /api/kunden - list") + class ListTests { + + @Test + @DisplayName("returns all customers when no search parameter is provided") + void returnsAllKundenWhenNoSucheParam() { + // Given + List expected = createKundenList(); + when(werkstattService.getAlleKunden()).thenReturn(expected); + + // When + List result = controller.liste(null); + + // Then + verify(werkstattService, never()).sucheKunden(any()); + verify(werkstattService).getAlleKunden(); + assertThat(result).isEqualTo(expected); + } + + @ParameterizedTest + @NullAndEmptySource + @DisplayName("returns all customers when suche is null or empty") + void returnsAllKundenWhenSucheIsEmpty(String suche) { + // Given + List expected = createKundenList(); + when(werkstattService.getAlleKunden()).thenReturn(expected); + + // When + List result = controller.liste(suche); + + // Then + verify(werkstattService, never()).sucheKunden(any()); + verify(werkstattService).getAlleKunden(); + assertThat(result).isEqualTo(expected); + } + + @Test + @DisplayName("returns searched customers when suche is provided and non-empty") + void returnsSearchedKundenWhenSucheProvided() { + // Given + String suche = "max"; + List expected = Collections.singletonList(createKunde(1L)); + when(werkstattService.sucheKunden("max")).thenReturn(expected); + + // When + List result = controller.liste(suche); + + // Then + verify(werkstattService).sucheKunden("max"); + verify(werkstattService, never()).getAlleKunden(); + assertThat(result).isEqualTo(expected); + } + + @Test + @DisplayName("trims leading/trailing whitespace from suche parameter") + void trimsSucheParameter() { + // Given + String suche = " max "; + List expected = Collections.singletonList(createKunde(1L)); + when(werkstattService.sucheKunden("max")).thenReturn(expected); + + // When + controller.liste(suche); + + // Then + verify(werkstattService).sucheKunden("max"); + } + } + + // --- @GetMapping("/{id}") tests --- + @Nested + @DisplayName("GET /api/kunden/{id} - single") + class SingleTests { + + @Test + @DisplayName("returns 200 OK with customer when found") + void returnsKundeWhenFound() { + // Given + long id = 1L; + Kunde expected = createKunde(id); + when(werkstattService.getKunde(id)).thenReturn(expected); + + // When + ResponseEntity response = controller.einzeln(id); + + // Then + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(expected); + } + + @Test + @DisplayName("returns 404 Not Found when customer not found") + void returnsNotFoundWhenKundeIsNull() { + // Given + long id = 2L; + when(werkstattService.getKunde(id)).thenReturn(null); + + // When + ResponseEntity response = controller.einzeln(id); + + // Then + assertThat(response.getStatusCode().value()).isEqualTo(404); + assertThat(response.getBody()).isNull(); + } + } + + // --- @GetMapping("/{id}/fahrzeuge") tests --- + @Nested + @DisplayName("GET /api/kunden/{id}/fahrzeuge - vehicles") + class VehiclesTests { + + @Test + @DisplayName("returns list of vehicles for given customer ID") + void returnsVehiclesForKunde() { + // Given + long id = 1L; + List expected = Collections.singletonList(createFahrzeug(10L, id)); + when(werkstattService.getFahrzeugeZuKunde(id)).thenReturn(expected); + + // When + List result = controller.fahrzeuge(id); + + // Then + verify(werkstattService).getFahrzeugeZuKunde(id); + assertThat(result).isEqualTo(expected); + } + + @Test + @DisplayName("returns empty list when no vehicles exist") + void returnsEmptyListWhenNoVehicles() { + // Given + long id = 1L; + when(werkstattService.getFahrzeugeZuKunde(id)).thenReturn(Collections.emptyList()); + + // When + List result = controller.fahrzeuge(id); + + // Then + verify(werkstattService).getFahrzeugeZuKunde(id); + assertThat(result).isEmpty(); + } + } + + // --- @PostMapping tests --- + @Nested + @DisplayName("POST /api/kunden - create") + class CreateTests { + + @Test + @DisplayName("sets ID to null and creates new customer") + void createsNewKunde() { + // Given + Kunde kunde = createKunde(100L); + kunde.setId(100L); // will be reset + Kunde created = createKunde(1L); + when(werkstattService.speichereKunde(any())).thenReturn(created); + + // When + Kunde result = controller.anlegen(kunde); + + // Then + assertThat(result).isEqualTo(created); + verify(werkstattService).speichereKunde(any(kundeClass())); // verify object passed + assertThat(kunde.getId()).isNull(); // Ensure passed-in ID was cleared + // Verify that ID was set to null inside speichereKunde call + ArgumentCaptor captor = ArgumentCaptor.forClass(Kunde.class); + verify(werkstattService).speichereKunde(captor.capture()); + assertThat(captor.getValue().getId()).isNull(); + } + + private Class kundeClass() { + return Kunde.class; + } + } + + // --- @PutMapping("/{id}") tests --- + @Nested + @DisplayName("PUT /api/kunden/{id} - update") + class UpdateTests { + + @Test + @DisplayName("returns updated customer when update succeeds") + void returnsUpdatedKundeOnSuccess() { + // Given + long id = 1L; + Kunde updatedKunde = createKunde(id); + Kunde saved = createKunde(id); + when(werkstattService.speichereKunde(any())).thenReturn(saved); + + // When + ResponseEntity response = controller.aendern(id, updatedKunde); + + // Then + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isEqualTo(saved); + assertThat(updatedKunde.getId()).isEqualTo(id); + } + + @Test + @DisplayName("returns 500 with exception message on failure") + void returnsInternalServerErrorOnException() { + // Given + long id = 1L; + Kunde kunde = createKunde(id); + String errorMsg = "DB constraint violation"; + when(werkstattService.speichereKunde(any())).thenThrow(new RuntimeException(errorMsg)); + + // When + ResponseEntity response = controller.aendern(id, kunde); + + // Then + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo(errorMsg); + } + + @Test + @DisplayName("sets customer ID before saving") + void setsIdBeforeSaving() { + // Given + long id = 23L; + Kunde kunde = createKunde(99L); // wrong ID + Kunde saved = createKunde(id); + when(werkstattService.speichereKunde(any())).thenReturn(saved); + + // When + controller.aendern(id, kunde); + + // Then + ArgumentCaptor captor = ArgumentCaptor.forClass(Kunde.class); + verify(werkstattService).speichereKunde(captor.capture()); + assertThat(captor.getValue().getId()).isEqualTo(id); + } + } + + // --- @DeleteMapping("/{id}") tests --- + @Nested + @DisplayName("DELETE /api/kunden/{id} - delete") + class DeleteTests { + + @Test + @DisplayName("returns 200 OK when deletion succeeds") + void returnsOkOnSuccess() { + // Given + long id = 1L; + + // When + ResponseEntity response = controller.loeschen(id); + + // Then + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loescheKunde(id); + } + + @Test + @DisplayName("returns 500 with exception message on failure") + void returnsInternalServerErrorOnException() { + // Given + long id = 1L; + String errorMsg = " foreign key constraint"; + doThrow(new RuntimeException(errorMsg)).when(werkstattService).loescheKunde(id); + + // When + ResponseEntity response = controller.loeschen(id); + + // Then + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).loescheKunde(id); + } + } + + // --- Helper methods --- + + private List createKundenList() { + return Arrays.asList( + createKunde(1L), + createKunde(2L) + ); + } + + private Kunde createKunde(Long id) { + Kunde kunde = new Kunde(); + kunde.setId(id); + kunde.setVorname("Max"); + kunde.setNachname("Mustermann"); + kunde.setAnrede("Herr"); + return kunde; + } + + private Fahrzeug createFahrzeug(Long id, Long kundeId) { + Fahrzeug fahrzeug = new Fahrzeug(); + fahrzeug.setId(id); + fahrzeug.setKundeId(kundeId); + fahrzeug.setKennzeichen("Wien AB 123"); + fahrzeug.setMarke("VW"); + fahrzeug.setModell("Golf"); + fahrzeug.setFahrgestellnr("12345678901234567"); + fahrzeug.setBaujahr(2020); + fahrzeug.setKmStand(15000); + fahrzeug.setPickerlDatum(new Date()); + fahrzeug.setAngelegtAm(new Date()); + return fahrzeug; + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..90c1d66 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..6403d20 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/maven-test.log @@ -0,0 +1,177 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @27c86f2d (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.321 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:22:35 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:22:35 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:22:35 AM PIT >> INFO : Sending 1 test classes to minion +11:22:35 AM PIT >> INFO : Sent tests to minion +11:22:36 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-\|/11:22:36 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:22:36 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:22:36 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungIsNull()]) took 552 ms +11:22:36 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()]) covered 7 blocks +11:22:36 AM PIT >> INFO : Created 1 mutation test units +/11:22:38 AM PIT >> INFO : Completed in 2 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 6 Killed 6 (100%) +> KILLED 6 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 2 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungIsNull()]) took 552 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()]) covered 7 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 14/14 (100%) +>> 1 tests examined +>> Generated 8 mutations Killed 8 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 8 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 8.544 s +[INFO] Finished at: 2026-08-02T11:22:38+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html new file mode 100644 index 0000000..9c36226 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/RechnungController.java.html @@ -0,0 +1,923 @@ + + + + + + + + + +

RechnungController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.model.Rechnung;
+ +4 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +5 + + + + + + +
import java.util.List;
+ +6 + + + + + + +
import org.springframework.http.ResponseEntity;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.PathVariable;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +10 + + + + + + +
import org.springframework.web.bind.annotation.PutMapping;
+ +11 + + + + + + +
import org.springframework.web.bind.annotation.RequestMapping;
+ +12 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +13 + + + + + + +
+ +14 + + + + + + +
@RestController
+ +15 + + + + + + +
@RequestMapping("/api/rechnungen")
+ +16 + + + + + + +
public class RechnungController {
+ +17 + + + + + + +
+ +18 + + + + + + +
  private final WerkstattService werkstattService;
+ +19 + + + + + + +
+ +20 + + + + + + +
  public RechnungController(WerkstattService werkstattService) {
+ +21 + + + + + + +
    this.werkstattService = werkstattService;
+ +22 + + + + + + +
  }
+ +23 + + + + + + +
+ +24 + + + + + + +
  @GetMapping
+ +25 + + + + + + +
  public List<Rechnung> liste() {
+ +26 + + +1 + +1. liste : replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED
+ +
+
+
    return werkstattService.getAlleRechnungen();
+ +27 + + + + + + +
  }
+ +28 + + + + + + +
+ +29 + + + + + + +
  @GetMapping("/{id}")
+ +30 + + + + + + +
  public ResponseEntity<Rechnung> einzeln(@PathVariable long id) {
+ +31 + + + + + + +
    Rechnung rechnung = werkstattService.getRechnung(id);
+ +32 + + +1 + +1. einzeln : negated conditional → KILLED
+ +
+
+
    if (rechnung == null) {
+ +33 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
      return ResponseEntity.notFound().build();
+ +34 + + + + + + +
    }
+ +35 + + +1 + +1. einzeln : replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED
+ +
+
+
    return ResponseEntity.ok(rechnung);
+ +36 + + + + + + +
  }
+ +37 + + + + + + +
+ +38 + + + + + + +
  @PostMapping("/auftrag/{auftragId}")
+ +39 + + + + + + +
  public ResponseEntity<?> erstellen(@PathVariable long auftragId) {
+ +40 + + + + + + +
    try {
+ +41 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.erstelleRechnung(auftragId));
+ +42 + + + + + + +
    } catch (Exception e) {
+ +43 + + +1 + +1. erstellen : replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +44 + + + + + + +
    }
+ +45 + + + + + + +
  }
+ +46 + + + + + + +
+ +47 + + + + + + +
  @PutMapping("/{id}/bezahlt")
+ +48 + + + + + + +
  public ResponseEntity<?> bezahlt(@PathVariable long id) {
+ +49 + + + + + + +
    try {
+ +50 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
      return ResponseEntity.ok(werkstattService.setzeBezahlt(id));
+ +51 + + + + + + +
    } catch (Exception e) {
+ +52 + + +1 + +1. bezahlt : replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED
+ +
+
+
      return ResponseEntity.status(500).body(e.getMessage());
+ +53 + + + + + + +
    }
+ +54 + + + + + + +
  }
+ +55 + + + + + + +
}

Mutations

26 + + + +

1.1
Location : liste
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()]
replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste → KILLED + +

32 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]
negated conditional → KILLED + +

33 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungIsNull()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

35 + + + +

1.1
Location : einzeln
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln → KILLED + +

41 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsCreatedRechnung_whenSuccessful()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

43 + + + +

1.1
Location : erstellen
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen → KILLED + +

50 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_handlesNullRechnungFromService()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

52 + + + +

1.1
Location : bezahlt
Killed by : at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsInternalServerError_whenExceptionThrown()]
replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsCreatedRechnung_whenSuccessful()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_handlesNullRechnungFromService()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()] (6 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungIsNull()] (552 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_handlesNullRechnungFromService()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsUpdatedRechnung_whenSuccessful()] (1 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsInternalServerError_whenExceptionThrown()] (4 ms)
  • at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()] (1 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..d127636 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
14/14
100%
8/8
100%
8/8
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
RechnungController.java
100%
14/14
100%
8/8
100%
8/8
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..35512af --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
14/14
100%
8/8
100%
8/8
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
14/14
100%
8/8
100%
8/8
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..12e313f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,11 @@ + + +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;50org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_handlesNullRechnungFromService()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerbezahlt(J)Lorg/springframework/http/ResponseEntity;52org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:bezahlt_returnsInternalServerError_whenExceptionThrown()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::bezahlt +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;32org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator111at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]negated conditional +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;33org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator164at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsNotFound_whenRechnungIsNull()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllereinzeln(J)Lorg/springframework/http/ResponseEntity;35org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator226at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:einzeln_returnsRechnung_whenFound()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::einzeln +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;41org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator92at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsCreatedRechnung_whenSuccessful()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllererstellen(J)Lorg/springframework/http/ResponseEntity;43org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator216at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:erstellen_returnsInternalServerError_whenExceptionThrown()]replaced return value with null for at/werkstatt/crm/controller/RechnungController::erstellen +RechnungController.javaat.werkstatt.crm.controller.RechnungControllerliste()Ljava/util/List;26org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator61at.werkstatt.crm.gen.RechnungControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungControllerGeneratedTest]/[method:liste_returnsAllRechnungen()]replaced return value with Collections.emptyList for at/werkstatt/crm/controller/RechnungController::liste + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml new file mode 100644 index 0000000..b3800af --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungControllerGeneratedTest.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt new file mode 100644 index 0000000..307161a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.321 s -- in at.werkstatt.crm.gen.RechnungControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java new file mode 100644 index 0000000..50c1bbf --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/repaired/RechnungControllerGeneratedTest.java @@ -0,0 +1,170 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.RechnungController; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; +import org.springframework.http.ResponseEntity; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.Mockito.*; + +class RechnungControllerGeneratedTest { + + private WerkstattService werkstattService; + private RechnungController controller; + + @BeforeEach + void setUp() { + werkstattService = Mockito.mock(WerkstattService.class); + controller = new RechnungController(werkstattService); + } + + @Test + void liste_returnsAllRechnungen() { + // Arrange + Rechnung r1 = new Rechnung(); + r1.setId(1L); + Rechnung r2 = new Rechnung(); + r2.setId(2L); + List expected = Arrays.asList(r1, r2); + when(werkstattService.getAlleRechnungen()).thenReturn(expected); + + // Act + List result = controller.liste(); + + // Assert + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAlleRechnungen(); + } + + @Test + void einzeln_returnsRechnung_whenFound() { + // Arrange + Rechnung rechnung = new Rechnung(); + rechnung.setId(1L); + when(werkstattService.getRechnung(1L)).thenReturn(rechnung); + + // Act + ResponseEntity response = controller.einzeln(1L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(rechnung); + verify(werkstattService).getRechnung(1L); + } + + @Test + void einzeln_returnsNotFound_whenRechnungIsNull() { + // Arrange + when(werkstattService.getRechnung(999L)).thenReturn(null); + + // Act + ResponseEntity response = controller.einzeln(999L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getRechnung(999L); + } + + @Test + void erstellen_returnsCreatedRechnung_whenSuccessful() { + // Arrange + Rechnung created = new Rechnung(); + created.setId(10L); + created.setRechnungNr("R-2025-001"); + when(werkstattService.erstelleRechnung(5L)).thenReturn(created); + + // Act + ResponseEntity response = controller.erstellen(5L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(created); + verify(werkstattService).erstelleRechnung(5L); + } + + @Test + void erstellen_returnsInternalServerError_whenExceptionThrown() { + // Arrange + String errorMsg = "Auftrag nicht gefunden"; + when(werkstattService.erstelleRechnung(999L)).thenThrow(new RuntimeException(errorMsg)); + + // Act + ResponseEntity response = controller.erstellen(999L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).erstelleRechnung(999L); + } + + @Test + void bezahlt_returnsUpdatedRechnung_whenSuccessful() { + // Arrange + Rechnung updated = new Rechnung(); + updated.setId(7L); + updated.setBezahlt(true); + updated.setBezahltAm(new Date()); + when(werkstattService.setzeBezahlt(7L)).thenReturn(updated); + + // Act + ResponseEntity response = controller.bezahlt(7L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(updated); + verify(werkstattService).setzeBezahlt(7L); + } + + @Test + void bezahlt_returnsInternalServerError_whenExceptionThrown() { + // Arrange + String errorMsg = "Rechnung nicht gefunden"; + when(werkstattService.setzeBezahlt(888L)).thenThrow(new RuntimeException(errorMsg)); + + // Act + ResponseEntity response = controller.bezahlt(888L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).setzeBezahlt(888L); + } + + @Test + void erstellen_handlesNullRechnungFromService() { + // Arrange + when(werkstattService.erstelleRechnung(100L)).thenReturn(null); + + // Act + ResponseEntity response = controller.erstellen(100L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).erstelleRechnung(100L); + } + + @Test + void bezahlt_handlesNullRechnungFromService() { + // Arrange + when(werkstattService.setzeBezahlt(200L)).thenReturn(null); + + // Act + ResponseEntity response = controller.bezahlt(200L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeBezahlt(200L); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..06d7f94 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/maven-test.log new file mode 100644 index 0000000..cb46b8e --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/maven-test.log @@ -0,0 +1,165 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @27c86f2d (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.AdminControllerGeneratedTest +OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.309 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:22:45 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:22:45 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:22:45 AM PIT >> INFO : Sending 1 test classes to minion +11:22:45 AM PIT >> INFO : Sent tests to minion +11:22:45 AM PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended +/-\|/-11:22:46 AM PIT >> INFO : Calculated coverage in 1 seconds. +11:22:46 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:22:46 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsEmptyStatistik_whenServiceReturnsEmptyMap()]) took 606 ms +11:22:46 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:constructor_injectsAllDependenciesCorrectly()]) covered 8 blocks +11:22:46 AM PIT >> INFO : Created 1 mutation test units +/11:22:47 AM PIT >> INFO : Completed in 2 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : 1 seconds +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 2 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsEmptyStatistik_whenServiceReturnsEmptyMap()]) took 606 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:constructor_injectsAllDependenciesCorrectly()]) covered 8 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 15/15 (100%) +>> 1 tests examined +>> Generated 2 mutations Killed 2 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 2 tests (1 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 8.449 s +[INFO] Finished at: 2026-08-02T11:22:47+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html new file mode 100644 index 0000000..6eacad4 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/AdminController.java.html @@ -0,0 +1,775 @@ + + + + + + + + + +

AdminController.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.controller;
+ +2 + + + + + + +
+ +3 + + + + + + +
import at.werkstatt.crm.service.WerkstattService;
+ +4 + + + + + + +
import java.util.HashMap;
+ +5 + + + + + + +
import java.util.Map;
+ +6 + + + + + + +
import org.springframework.beans.factory.annotation.Value;
+ +7 + + + + + + +
import org.springframework.web.bind.annotation.GetMapping;
+ +8 + + + + + + +
import org.springframework.web.bind.annotation.PostMapping;
+ +9 + + + + + + +
import org.springframework.web.bind.annotation.RestController;
+ +10 + + + + + + +
+ +11 + + + + + + +
/**
+ +12 + + + + + + +
 * Stage 5 (SD-2, ADR-0004): the JSP admin page is absorbed into the SPA — this controller now
+ +13 + + + + + + +
 * serves JSON for the Angular /admin route (gson and the whole JSP/JSTL stack died with the page).
+ +14 + + + + + + +
 * POST /admin/bereinigen keeps its path and its exact German meldung: that contract is pinned by
+ +15 + + + + + + +
 * the characterization suite on both stands.
+ +16 + + + + + + +
 */
+ +17 + + + + + + +
@RestController
+ +18 + + + + + + +
public class AdminController {
+ +19 + + + + + + +
+ +20 + + + + + + +
  private final WerkstattService werkstattService;
+ +21 + + + + + + +
  private final String firmaName;
+ +22 + + + + + + +
  private final String version;
+ +23 + + + + + + +
+ +24 + + + + + + +
  public AdminController(
+ +25 + + + + + + +
      WerkstattService werkstattService,
+ +26 + + + + + + +
      @Value("${werkstatt.firma.name}") String firmaName,
+ +27 + + + + + + +
      @Value("${werkstatt.version:?}") String version) {
+ +28 + + + + + + +
    this.werkstattService = werkstattService;
+ +29 + + + + + + +
    this.firmaName = firmaName;
+ +30 + + + + + + +
    this.version = version;
+ +31 + + + + + + +
  }
+ +32 + + + + + + +
+ +33 + + + + + + +
  @GetMapping("/api/admin/statistik")
+ +34 + + + + + + +
  public Map<String, Object> statistik() {
+ +35 + + + + + + +
    Map<String, Object> antwort = new HashMap<>();
+ +36 + + + + + + +
    antwort.put("firmaName", firmaName);
+ +37 + + + + + + +
    antwort.put("version", version);
+ +38 + + + + + + +
    antwort.put("statistik", werkstattService.getAdminStatistik());
+ +39 + + +1 + +1. statistik : replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::statistik → KILLED
+ +
+
+
    return antwort;
+ +40 + + + + + + +
  }
+ +41 + + + + + + +
+ +42 + + + + + + +
  @PostMapping("/admin/bereinigen")
+ +43 + + + + + + +
  public Map<String, Object> bereinigen() {
+ +44 + + + + + + +
    int anzahl = werkstattService.bereinigeStornierte();
+ +45 + + + + + + +
    Map<String, Object> antwort = new HashMap<>();
+ +46 + + + + + + +
    antwort.put("geloescht", anzahl);
+ +47 + + + + + + +
    antwort.put("meldung", anzahl + " stornierte Aufträge wurden endgültig gelöscht.");
+ +48 + + +1 + +1. bereinigen : replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED
+ +
+
+
    return antwort;
+ +49 + + + + + + +
  }
+ +50 + + + + + + +
}

Mutations

39 + + + +

1.1
Location : statistik
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:constructor_injectsAllDependenciesCorrectly()]
replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::statistik → KILLED + +

48 + + + +

1.1
Location : bereinigen
Killed by : at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_returnsCorrectCountAndMessage_whenDeletionsSuccess()]
replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::bereinigen → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:constructor_injectsAllDependenciesCorrectly()] (1 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsExpectedStructure_whenCalled()] (3 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:statistik_returnsEmptyStatistik_whenServiceReturnsEmptyMap()] (606 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_returnsCorrectCountAndMessage_whenDeletionsSuccess()] (1 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_handlesLargeDeletionCount()] (1 ms)
  • at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_handlesZeroDeletionsCorrectly()] (2 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html new file mode 100644 index 0000000..ac23518 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/at.werkstatt.crm.controller/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.controller

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
15/15
100%
2/2
100%
2/2
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
AdminController.java
100%
15/15
100%
2/2
100%
2/2
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..68a2707 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
15/15
100%
2/2
100%
2/2
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.controller1
100%
15/15
100%
2/2
100%
2/2
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..f74c753 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,5 @@ + + +AdminController.javaat.werkstatt.crm.controller.AdminControllerbereinigen()Ljava/util/Map;48org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator325at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:bereinigen_returnsCorrectCountAndMessage_whenDeletionsSuccess()]replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::bereinigen +AdminController.javaat.werkstatt.crm.controller.AdminControllerstatistik()Ljava/util/Map;39org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator355at.werkstatt.crm.gen.AdminControllerGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.AdminControllerGeneratedTest]/[method:constructor_injectsAllDependenciesCorrectly()]replaced return value with Collections.emptyMap for at/werkstatt/crm/controller/AdminController::statistik + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml new file mode 100644 index 0000000..013ddcf --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.AdminControllerGeneratedTest.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt new file mode 100644 index 0000000..2672d0f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.AdminControllerGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.AdminControllerGeneratedTest +------------------------------------------------------------------------------- +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.309 s -- in at.werkstatt.crm.gen.AdminControllerGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java new file mode 100644 index 0000000..a69634a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/repaired/AdminControllerGeneratedTest.java @@ -0,0 +1,123 @@ +package at.werkstatt.crm.gen; + +import at.werkstatt.crm.controller.AdminController; +import at.werkstatt.crm.service.WerkstattService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) +class AdminControllerGeneratedTest { + + @Mock + private WerkstattService werkstattService; + + private AdminController adminController; + + @BeforeEach + void setUp() { + adminController = new AdminController(werkstattService, "TestFirma", "1.2.3"); + } + + @Test + void statistik_returnsExpectedStructure_whenCalled() { + // Arrange + Map expectedStatistik = new HashMap<>(); + expectedStatistik.put("kunden", 10); + expectedStatistik.put("fahrzeuge", 15); + expectedStatistik.put("auftraege", 20); + when(werkstattService.getAdminStatistik()).thenReturn(expectedStatistik); + + // Act + Map result = adminController.statistik(); + + // Assert + assertThat(result).hasSize(3); + assertThat(result).containsEntry("firmaName", "TestFirma"); + assertThat(result).containsEntry("version", "1.2.3"); + assertThat(result).containsEntry("statistik", expectedStatistik); + } + + @Test + void statistik_returnsEmptyStatistik_whenServiceReturnsEmptyMap() { + // Arrange + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act + Map result = adminController.statistik(); + + // Assert + assertThat(result).hasSize(3); + assertThat(result).containsEntry("firmaName", "TestFirma"); + assertThat(result).containsEntry("version", "1.2.3"); + assertThat(result).containsEntry("statistik", new HashMap<>()); + } + + @Test + void bereinigen_returnsCorrectCountAndMessage_whenDeletionsSuccess() { + // Arrange + int deletedCount = 5; + when(werkstattService.bereinigeStornierte()).thenReturn(deletedCount); + + // Act + Map result = adminController.bereinigen(); + + // Assert + assertThat(result).hasSize(2); + assertThat(result).containsEntry("geloescht", deletedCount); + assertThat(result).containsEntry("meldung", deletedCount + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_handlesZeroDeletionsCorrectly() { + // Arrange + int deletedCount = 0; + when(werkstattService.bereinigeStornierte()).thenReturn(deletedCount); + + // Act + Map result = adminController.bereinigen(); + + // Assert + assertThat(result).hasSize(2); + assertThat(result).containsEntry("geloescht", deletedCount); + assertThat(result).containsEntry("meldung", deletedCount + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_handlesLargeDeletionCount() { + // Arrange + int deletedCount = 1000; + when(werkstattService.bereinigeStornierte()).thenReturn(deletedCount); + + // Act + Map result = adminController.bereinigen(); + + // Assert + assertThat(result).hasSize(2); + assertThat(result).containsEntry("geloescht", deletedCount); + assertThat(result).containsEntry("meldung", deletedCount + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void constructor_injectsAllDependenciesCorrectly() { + // Arrange & Act + AdminController controller = new AdminController(werkstattService, "FirmaX", "2.0"); + + // Assert + assertThat(controller).isNotNull(); + // Note: We cannot directly access private fields, but we can verify behavior via public methods + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + Map stat = controller.statistik(); + assertThat(stat).containsEntry("firmaName", "FirmaX"); + assertThat(stat).containsEntry("version", "2.0"); + } +} diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/jacoco.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/jacoco.xml new file mode 100644 index 0000000..a7d2724 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/jacoco.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/maven-test.log b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/maven-test.log new file mode 100644 index 0000000..501c1e1 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/maven-test.log @@ -0,0 +1,187 @@ +WARNING: A terminally deprecated method in sun.misc.Unsafe has been called +WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/guice-5.1.0-classes.jar) +WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner +WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release +WARNING: Final field _cipher in class org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher has been mutated reflectively by class org.eclipse.sisu.bean.BeanPropertyField in unnamed module @10db82ae (file:/home/skern/.m2/wrapper/dists/apache-maven-3.9.11/a2d47e15/lib/org.eclipse.sisu.inject-0.9.0.M4.jar) +WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning +WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled +[INFO] Scanning for projects... +[INFO] +[INFO] --------------< at.stoicera.migrationlab:testbed-modern >--------------- +[INFO] Building ai-testgen testbed — corpus B (modern) 1.0.0 +[INFO] from pom.xml +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- clean:3.2.0:clean (default-clean) @ testbed-modern --- +[INFO] Deleting /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target +[INFO] +[INFO] --- dependency:3.11.0:properties (resolve-agent-paths) @ testbed-modern --- +[INFO] +[INFO] --- jacoco:0.8.15:prepare-agent (prepare-agent) @ testbed-modern --- +[INFO] argLine set to -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** +[INFO] +[INFO] --- build-helper:3.6.1:add-source (add-code-under-test) @ testbed-modern --- +[INFO] Source directory: /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/../../../modern/src/main/java added. +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/main/resources +[INFO] +[INFO] --- compiler:3.15.0:compile (default-compile) @ testbed-modern --- +[INFO] Recompiling the module because of changed source code. +[INFO] Compiling 16 source files with javac [debug release 25] to target/classes +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ testbed-modern --- +[INFO] skip non existing resourceDirectory /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/src/test/resources +[INFO] +[INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ testbed-modern --- +[INFO] Recompiling the module because of changed dependency. +[INFO] Compiling 1 source file with javac [debug release 25] to target/test-classes +[INFO] +[INFO] --- surefire:3.5.6:test (default-test) @ testbed-modern --- +[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider +[INFO] +[INFO] ------------------------------------------------------- +[INFO] T E S T S +[INFO] ------------------------------------------------------- +[INFO] Running at.werkstatt.crm.gen.RechnungGeneratedTest +[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.193 s -- in at.werkstatt.crm.gen.RechnungGeneratedTest +[INFO] +[INFO] Results: +[INFO] +[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0 +[INFO] +[INFO] +[INFO] --- jacoco:0.8.15:report (report) @ testbed-modern --- +[INFO] Loading execution data file /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec +[INFO] Analyzed bundle 'ai-testgen testbed — corpus B (modern)' with 28 classes +[INFO] +[INFO] --- pitest:1.25.8:mutationCoverage (default-cli) @ testbed-modern --- +[INFO] Root dir is : /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern +[INFO] Found plugin : Default csv report plugin +[INFO] Found plugin : Default xml report plugin +[INFO] Found plugin : Log progress during mutation analysis +[INFO] Found plugin : Default html report plugin +[INFO] Found plugin : Static initializer code detector plugin +[INFO] Found plugin : Excluded annotations plugin +[INFO] Found plugin : Try with resources filter +[INFO] Found plugin : Inlined finally block filter plugin +[INFO] Found plugin : Implicit null check filter +[INFO] Found plugin : Method reference null check filter +[INFO] Found plugin : For each loop filter +[INFO] Found plugin : Enum junk filter +[INFO] Found plugin : Record junk mutation filter +[INFO] Found plugin : String switch filter +[INFO] Found plugin : Assertions filter +[INFO] Found plugin : Enum switch filter +[INFO] Found plugin : Logging calls filter +[INFO] Found plugin : Infinite for loop filter +[INFO] Found plugin : Long running iterator loop filter +[INFO] Found plugin : For loop counter filter +[INFO] Found plugin : Kotlin junk mutations filter +[INFO] Found plugin : Groovy junk mutations filter +[INFO] Found plugin : Max mutations per class limit +[INFO] Found plugin : Equals shortcut equivalent mutant filter +[INFO] Found plugin : Trivial return vals equivalence filter +[INFO] Found plugin : Filters mutants with line number <= 1 +[INFO] Found plugin : Division by one equivalent mutant filter +[INFO] Found plugin : Lombok junk mutations filter +[INFO] Found plugin : Filter mutations to defensive wrappers such as unmodifiableCollection on return or field write +[INFO] Found plugin : Final field null assignment equivalent mutant filter +[INFO] Found plugin : Mutant export plugin +[INFO] Found plugin : Auto add java.awt.headless=true to keep keyboard focus on Mac OS +[INFO] Found plugin : Auto set number of threads based on machine +[INFO] Found plugin : Automatically add -ea to launch args to enable assertions +[INFO] Found plugin : Default build verifier +[INFO] Found plugin : Detect missing JUnit5 plugin +[INFO] Found plugin : Detect missing TestNG plugin +[INFO] Found plugin : Detect missing kotlin plugin +[INFO] Found plugin : Detect missing spring plugin +[INFO] Found plugin : Default coverage exporter +[INFO] Found plugin : Basic test statistics +[INFO] Found shared classpath plugin : Default mutation engine +[INFO] Found shared classpath plugin : JUnit 5 test framework support +[INFO] Found shared classpath plugin : JUnit plugin +[INFO] Found shared classpath plugin : Support for mocking frameworks using javassist +[INFO] Found shared classpath plugin : Disable JaCoCo +[INFO] Found shared classpath plugin : Reset environment for javassist +[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_SWITCH +[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath +[INFO] Adding org.pitest:pitest to SUT classpath +[INFO] Auto adding org.junit.platform:junit-platform-launcher:jar:6.0.3 < central (https://repo.maven.apache.org/maven2, default, releases) to classpath. +[INFO] Mutating from /home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/classes +[INFO] Replacing properties in argLine -javaagent:/home/skern/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/home/skern/Work/projects-01/migration-lab/ai-testgen/testbed/modern/target/jacoco.exec,excludes=at/werkstatt/crm/gen/** @{argLine} -javaagent:${org.mockito:mockito-core:jar} +11:22:53 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. +11:22:53 AM PIT >> INFO : Created 1 mutation test units in pre scan +11:22:53 AM PIT >> INFO : Sending 1 test classes to minion +11:22:53 AM PIT >> INFO : Sent tests to minion +/-\|/-\11:22:54 AM PIT >> INFO : Calculated coverage in 0 seconds. +11:22:54 AM PIT >> INFO : 0 tests took longer than 2000 ms +11:22:54 AM PIT >> INFO : Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:settersAndGettersWorkCorrectly()]) took 58 ms +11:22:54 AM PIT >> INFO : Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]) covered 24 blocks +11:22:54 AM PIT >> INFO : Created 1 mutation test units +/11:22:55 AM PIT >> INFO : Completed in 1 seconds +================================================================================ +- Mutators +================================================================================ +> org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator +>> Generated 3 Killed 3 (100%) +> KILLED 3 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator +>> Generated 2 Killed 2 (100%) +> KILLED 2 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator +>> Generated 5 Killed 5 (100%) +> KILLED 5 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator +>> Generated 1 Killed 1 (100%) +> KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 +> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 +> NO_COVERAGE 0 EQUIVALENT 0 +-------------------------------------------------------------------------------- +================================================================================ +- Timings +================================================================================ +> pre-scan for mutations : < 1 second +> scan classpath : < 1 second +> coverage and dependency analysis : < 1 second +> build mutation tests : < 1 second +> run mutation analysis : 1 seconds +-------------------------------------------------------------------------------- +> Total : 1 seconds +-------------------------------------------------------------------------------- +> 0 tests took longer than 2000 ms +> Slowest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:settersAndGettersWorkCorrectly()]) took 58 ms +> Largest test ([engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]) covered 24 blocks +================================================================================ +- Statistics +================================================================================ +>> Line Coverage (for mutated classes only): 34/34 (100%) +>> 1 tests examined +>> Generated 12 mutations Killed 12 (100%) +>> Mutations with no coverage 0. Test strength 100% +>> Ran 19 tests (1.58 tests per mutation) +Enhanced functionality available at https://www.arcmutate.com/ + +Build messages:- +* Project uses Spring, but the Arcmutate Spring plugin is not present. (https://docs.arcmutate.com/docs/spring.html) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 6.426 s +[INFO] Finished at: 2026-08-02T11:22:55+02:00 +[INFO] ------------------------------------------------------------------------ diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html new file mode 100644 index 0000000..95cbc3a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/Rechnung.java.html @@ -0,0 +1,1748 @@ + + + + + + + + + +

Rechnung.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +1 + + + + + + +
package at.werkstatt.crm.model;
+ +2 + + + + + + +
+ +3 + + + + + + +
import java.util.Date;
+ +4 + + + + + + +
+ +5 + + + + + + +
public class Rechnung {
+ +6 + + + + + + +
+ +7 + + + + + + +
  private Long id;
+ +8 + + + + + + +
  private String rechnungNr;
+ +9 + + + + + + +
  private Long auftragId;
+ +10 + + + + + + +
  private Date ausgestelltAm;
+ +11 + + + + + + +
  // Betraege als double, gerundet wird beim Erstellen (siehe WerkstattService)
+ +12 + + + + + + +
  private double summeNetto;
+ +13 + + + + + + +
  private double ust;
+ +14 + + + + + + +
  private double summeBrutto;
+ +15 + + + + + + +
  private boolean bezahlt;
+ +16 + + + + + + +
  private Date bezahltAm;
+ +17 + + + + + + +
+ +18 + + + + + + +
  // Anzeige
+ +19 + + + + + + +
  private String auftragNr;
+ +20 + + + + + + +
  private String kundeName;
+ +21 + + + + + + +
+ +22 + + + + + + +
  public Rechnung() {}
+ +23 + + + + + + +
+ +24 + + + + + + +
  public Long getId() {
+ +25 + + +1 + +1. getId : replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId → KILLED
+ +
+
+
    return id;
+ +26 + + + + + + +
  }
+ +27 + + + + + + +
+ +28 + + + + + + +
  public void setId(Long id) {
+ +29 + + + + + + +
    this.id = id;
+ +30 + + + + + + +
  }
+ +31 + + + + + + +
+ +32 + + + + + + +
  public String getRechnungNr() {
+ +33 + + +1 + +1. getRechnungNr : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr → KILLED
+ +
+
+
    return rechnungNr;
+ +34 + + + + + + +
  }
+ +35 + + + + + + +
+ +36 + + + + + + +
  public void setRechnungNr(String rechnungNr) {
+ +37 + + + + + + +
    this.rechnungNr = rechnungNr;
+ +38 + + + + + + +
  }
+ +39 + + + + + + +
+ +40 + + + + + + +
  public Long getAuftragId() {
+ +41 + + +1 + +1. getAuftragId : replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId → KILLED
+ +
+
+
    return auftragId;
+ +42 + + + + + + +
  }
+ +43 + + + + + + +
+ +44 + + + + + + +
  public void setAuftragId(Long auftragId) {
+ +45 + + + + + + +
    this.auftragId = auftragId;
+ +46 + + + + + + +
  }
+ +47 + + + + + + +
+ +48 + + + + + + +
  public Date getAusgestelltAm() {
+ +49 + + +1 + +1. getAusgestelltAm : replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm → KILLED
+ +
+
+
    return ausgestelltAm;
+ +50 + + + + + + +
  }
+ +51 + + + + + + +
+ +52 + + + + + + +
  public void setAusgestelltAm(Date ausgestelltAm) {
+ +53 + + + + + + +
    this.ausgestelltAm = ausgestelltAm;
+ +54 + + + + + + +
  }
+ +55 + + + + + + +
+ +56 + + + + + + +
  public double getSummeNetto() {
+ +57 + + +1 + +1. getSummeNetto : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto → KILLED
+ +
+
+
    return summeNetto;
+ +58 + + + + + + +
  }
+ +59 + + + + + + +
+ +60 + + + + + + +
  public void setSummeNetto(double summeNetto) {
+ +61 + + + + + + +
    this.summeNetto = summeNetto;
+ +62 + + + + + + +
  }
+ +63 + + + + + + +
+ +64 + + + + + + +
  public double getUst() {
+ +65 + + +1 + +1. getUst : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst → KILLED
+ +
+
+
    return ust;
+ +66 + + + + + + +
  }
+ +67 + + + + + + +
+ +68 + + + + + + +
  public void setUst(double ust) {
+ +69 + + + + + + +
    this.ust = ust;
+ +70 + + + + + + +
  }
+ +71 + + + + + + +
+ +72 + + + + + + +
  public double getSummeBrutto() {
+ +73 + + +1 + +1. getSummeBrutto : replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto → KILLED
+ +
+
+
    return summeBrutto;
+ +74 + + + + + + +
  }
+ +75 + + + + + + +
+ +76 + + + + + + +
  public void setSummeBrutto(double summeBrutto) {
+ +77 + + + + + + +
    this.summeBrutto = summeBrutto;
+ +78 + + + + + + +
  }
+ +79 + + + + + + +
+ +80 + + + + + + +
  public boolean isBezahlt() {
+ +81 + + +2 + +1. isBezahlt : replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED
+2. isBezahlt : replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED
+ +
+
+
    return bezahlt;
+ +82 + + + + + + +
  }
+ +83 + + + + + + +
+ +84 + + + + + + +
  public void setBezahlt(boolean bezahlt) {
+ +85 + + + + + + +
    this.bezahlt = bezahlt;
+ +86 + + + + + + +
  }
+ +87 + + + + + + +
+ +88 + + + + + + +
  public Date getBezahltAm() {
+ +89 + + +1 + +1. getBezahltAm : replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm → KILLED
+ +
+
+
    return bezahltAm;
+ +90 + + + + + + +
  }
+ +91 + + + + + + +
+ +92 + + + + + + +
  public void setBezahltAm(Date bezahltAm) {
+ +93 + + + + + + +
    this.bezahltAm = bezahltAm;
+ +94 + + + + + + +
  }
+ +95 + + + + + + +
+ +96 + + + + + + +
  public String getAuftragNr() {
+ +97 + + +1 + +1. getAuftragNr : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr → KILLED
+ +
+
+
    return auftragNr;
+ +98 + + + + + + +
  }
+ +99 + + + + + + +
+ +100 + + + + + + +
  public void setAuftragNr(String auftragNr) {
+ +101 + + + + + + +
    this.auftragNr = auftragNr;
+ +102 + + + + + + +
  }
+ +103 + + + + + + +
+ +104 + + + + + + +
  public String getKundeName() {
+ +105 + + +1 + +1. getKundeName : replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName → KILLED
+ +
+
+
    return kundeName;
+ +106 + + + + + + +
  }
+ +107 + + + + + + +
+ +108 + + + + + + +
  public void setKundeName(String kundeName) {
+ +109 + + + + + + +
    this.kundeName = kundeName;
+ +110 + + + + + + +
  }
+ +111 + + + + + + +
}

Mutations

25 + + + +

1.1
Location : getId
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId → KILLED + +

33 + + + +

1.1
Location : getRechnungNr
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr → KILLED + +

41 + + + +

1.1
Location : getAuftragId
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId → KILLED + +

49 + + + +

1.1
Location : getAusgestelltAm
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm → KILLED + +

57 + + + +

1.1
Location : getSummeNetto
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto → KILLED + +

65 + + + +

1.1
Location : getUst
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:doubleValuesCanBeSetToZeroAndNegative()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst → KILLED + +

73 + + + +

1.1
Location : getSummeBrutto
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:doubleValuesCanBeSetToZeroAndNegative()]
replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto → KILLED + +

81 + + + +

1.1
Location : isBezahlt
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED +

2.2
Location : isBezahlt
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:booleanBezahltCanBeSetToFalse()]
replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt → KILLED + +

89 + + + +

1.1
Location : getBezahltAm
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm → KILLED + +

97 + + + +

1.1
Location : getAuftragNr
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr → KILLED + +

105 + + + +

1.1
Location : getKundeName
Killed by : at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]
replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName → KILLED + +

+ + +

Active mutators

+
    +
  • CONDITIONALS_BOUNDARY
  • +
  • EMPTY_RETURNS
  • +
  • FALSE_RETURNS
  • +
  • INCREMENTS
  • +
  • INVERT_NEGS
  • +
  • MATH
  • +
  • NEGATE_CONDITIONALS
  • +
  • NULL_RETURNS
  • +
  • PRIMITIVE_RETURNS
  • +
  • TRUE_RETURNS
  • +
  • VOID_METHOD_CALLS
  • + +
+ +

Tests examined

+
    +
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:doubleValuesCanBeSetToZeroAndNegative()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:defaultConstructorInitializesAllFieldsToNullOrFalse()] (1 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:settersAndGettersWorkCorrectly()] (58 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:dateFieldsCanBeSetToNull()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:booleanBezahltCanBeSetToFalse()] (0 ms)
  • at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:stringFieldsCanBeSetToEmptyString()] (0 ms)
  • +
+ +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html new file mode 100644 index 0000000..1769b88 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/at.werkstatt.crm.model/index.html @@ -0,0 +1,62 @@ + + + + + + + + +

Pit Test Coverage Report

+

Package Summary

+

at.werkstatt.crm.model

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
34/34
100%
12/12
100%
12/12
+ + +

Breakdown by Class

+ + + + + + + + + + + + + + + + + + + +
NameLine CoverageMutation CoverageTest Strength
Rechnung.java
100%
34/34
100%
12/12
100%
12/12
+
+ + + +
+ +Report generated by PIT 1.25.8 support + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/index.html b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/index.html new file mode 100644 index 0000000..cd5efb0 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/index.html @@ -0,0 +1,74 @@ + + + + + + + + +

Pit Test Coverage Report

+ +

Project Summary

+ + + + + + + + + + + + + + + + + +
Number of ClassesLine CoverageMutation CoverageTest Strength
1100%
34/34
100%
12/12
100%
12/12
+ + +

Breakdown by Package

+ + + + + + + + + + + + + + + + + + + + + +
NameNumber of ClassesLine CoverageMutation CoverageTest Strength
at.werkstatt.crm.model1
100%
34/34
100%
12/12
100%
12/12
+
+ + + + +
+ + + +Report generated by PIT 1.25.8 support + +
+
+ + Enhanced functionality available at arcmutate.com + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml new file mode 100644 index 0000000..6cba9a1 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/mutations.xml @@ -0,0 +1,15 @@ + + +Rechnung.javaat.werkstatt.crm.model.RechnunggetAuftragId()Ljava/lang/Long;41org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getAuftragId +Rechnung.javaat.werkstatt.crm.model.RechnunggetAuftragNr()Ljava/lang/String;97org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getAuftragNr +Rechnung.javaat.werkstatt.crm.model.RechnunggetAusgestelltAm()Ljava/util/Date;49org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced return value with null for at/werkstatt/crm/model/Rechnung::getAusgestelltAm +Rechnung.javaat.werkstatt.crm.model.RechnunggetBezahltAm()Ljava/util/Date;89org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced return value with null for at/werkstatt/crm/model/Rechnung::getBezahltAm +Rechnung.javaat.werkstatt.crm.model.RechnunggetId()Ljava/lang/Long;25org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced Long return value with 0L for at/werkstatt/crm/model/Rechnung::getId +Rechnung.javaat.werkstatt.crm.model.RechnunggetKundeName()Ljava/lang/String;105org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getKundeName +Rechnung.javaat.werkstatt.crm.model.RechnunggetRechnungNr()Ljava/lang/String;33org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced return value with "" for at/werkstatt/crm/model/Rechnung::getRechnungNr +Rechnung.javaat.werkstatt.crm.model.RechnunggetSummeBrutto()D73org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:doubleValuesCanBeSetToZeroAndNegative()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeBrutto +Rechnung.javaat.werkstatt.crm.model.RechnunggetSummeNetto()D57org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getSummeNetto +Rechnung.javaat.werkstatt.crm.model.RechnunggetUst()D65org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:doubleValuesCanBeSetToZeroAndNegative()]replaced double return with 0.0d for at/werkstatt/crm/model/Rechnung::getUst +Rechnung.javaat.werkstatt.crm.model.RechnungisBezahlt()Z81org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:allFieldsCanBeSetInSequenceAndRetrievedConsistently()]replaced boolean return with false for at/werkstatt/crm/model/Rechnung::isBezahlt +Rechnung.javaat.werkstatt.crm.model.RechnungisBezahlt()Z81org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator50at.werkstatt.crm.gen.RechnungGeneratedTest.[engine:junit-jupiter]/[class:at.werkstatt.crm.gen.RechnungGeneratedTest]/[method:booleanBezahltCanBeSetToFalse()]replaced boolean return with true for at/werkstatt/crm/model/Rechnung::isBezahlt + diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/style.css b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/style.css new file mode 100644 index 0000000..a492c50 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/pit-reports/style.css @@ -0,0 +1,574 @@ +html, body, div, span, p, blockquote, pre { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +body{ + line-height: 1; + color: black; + background: white; + margin-left: 20px; +} + +.src { + border: 1px solid #dddddd; + padding-top: 10px; + padding-right: 5px; + padding-left: 5px; + font-family: Consolas, Courier, monospace; +} + +.covered, .COVERED { + background-color: #ddffdd; +} + +.uncovered, .UNCOVERED { + background-color: #ffdddd; +} + +.killed, .KILLED { + background-color: #aaffaa; +} + +.survived, .SURVIVED { + background-color: #ffaaaa; +} + +.uncertain, .UNCERTAIN { + background-color: #dde7ef; +} + +.run_error, .RUN_ERROR { + background-color: #dde7ef; +} + +.na { + background-color: #eeeeee; +} + +.timed_out, .TIMED_OUT { + background-color: #dde7ef; +} + +.non_viable, .NON_VIABLE { + background-color: #aaffaa; +} + +.memory_error, .MEMORY_ERROR { + background-color: #dde7ef; +} + +.not_started, .NO_STARTED { + background-color: #dde7ef; color : red +} + +.no_coverage, .NO_COVERAGE { + background-color: #ffaaaa; +} + +.tests { + width: 50%; + float: left; +} + +.mutees { + float: right; + width: 50%; +} + +.unit { + padding-top: 20px; + clear: both; +} + +.coverage_bar { + display: inline-block; + height: 1.1em; + width: 130px; + background: #FAA; + margin: 0 5px; + vertical-align: middle; + border: 1px solid #AAA; + position: relative; +} + +.coverage_complete { + display: inline-block; + height: 100%; + background: #DFD; + float: left; +} + +.coverage_legend { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: center; +} + +.line, .mut { + vertical-align: middle; +} + +.coverage_percentage { + display: inline-block; + min-width: 3em; + text-align: right; +} + +.pop { + outline:none; +} + +.pop strong { + line-height: 30px; +} + +.pop { + text-decoration: none; +} + +.pop span { + z-index: 10; + display: none; + padding: 14px 20px; + margin-top: -30px; + margin-left: 28px; + width: 800px; + line-height: 16px; + word-wrap: break-word; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -moz-box-shadow: 5px 5px 8px #CCC; + -webkit-box-shadow: 5px 5px 8px #CCC; + box-shadow: 5px 5px 8px #CCC; +} + +.pop:hover span { + display: inline; + position: absolute; + color: #111; + border: 1px solid #DCA; + background: #fffAF0; +} + +.width-1 { + width: 1%; +} + +.width-2 { + width: 2%; +} + +.width-3 { + width: 3%; +} + +.width-4 { + width: 4%; +} + +.width-5 { + width: 5%; +} + +.width-6 { + width: 6%; +} + +.width-7 { + width: 7%; +} + +.width-8 { + width: 8%; +} + +.width-9 { + width: 9%; +} + +.width-10 { + width: 10%; +} + +.width-11 { + width: 11%; +} + +.width-12 { + width: 12%; +} + +.width-13 { + width: 13%; +} + +.width-14 { + width: 14%; +} + +.width-15 { + width: 15%; +} + +.width-16 { + width: 16%; +} + +.width-17 { + width: 17%; +} + +.width-18 { + width: 18%; +} + +.width-19 { + width: 19%; +} + +.width-20 { + width: 20%; +} + +.width-21 { + width: 21%; +} + +.width-22 { + width: 22%; +} + +.width-23 { + width: 23%; +} + +.width-24 { + width: 24%; +} + +.width-25 { + width: 25%; +} + +.width-26 { + width: 26%; +} + +.width-27 { + width: 27%; +} + +.width-28 { + width: 28%; +} + +.width-29 { + width: 29%; +} + +.width-30 { + width: 30%; +} + +.width-31 { + width: 31%; +} + +.width-32 { + width: 32%; +} + +.width-33 { + width: 33%; +} + +.width-34 { + width: 34%; +} + +.width-35 { + width: 35%; +} + +.width-36 { + width: 36%; +} + +.width-37 { + width: 37%; +} + +.width-38 { + width: 38%; +} + +.width-39 { + width: 39%; +} + +.width-40 { + width: 40%; +} + +.width-41 { + width: 41%; +} + +.width-42 { + width: 42%; +} + +.width-43 { + width: 43%; +} + +.width-44 { + width: 44%; +} + +.width-45 { + width: 45%; +} + +.width-46 { + width: 46%; +} + +.width-47 { + width: 47%; +} + +.width-48 { + width: 48%; +} + +.width-49 { + width: 49%; +} + +.width-50 { + width: 50%; +} + +.width-51 { + width: 51%; +} + +.width-52 { + width: 52%; +} + +.width-53 { + width: 53%; +} + +.width-54 { + width: 54%; +} + +.width-55 { + width: 55%; +} + +.width-56 { + width: 56%; +} + +.width-57 { + width: 57%; +} + +.width-58 { + width: 58%; +} + +.width-59 { + width: 59%; +} + +.width-60 { + width: 60%; +} + +.width-61 { + width: 61%; +} + +.width-62 { + width: 62%; +} + +.width-63 { + width: 63%; +} + +.width-64 { + width: 64%; +} + +.width-65 { + width: 65%; +} + +.width-66 { + width: 66%; +} + +.width-67 { + width: 67%; +} + +.width-68 { + width: 68%; +} + +.width-69 { + width: 69%; +} + +.width-70 { + width: 70%; +} + +.width-71 { + width: 71%; +} + +.width-72 { + width: 72%; +} + +.width-73 { + width: 73%; +} + +.width-74 { + width: 74%; +} + +.width-75 { + width: 75%; +} + +.width-76 { + width: 76%; +} + +.width-77 { + width: 77%; +} + +.width-78 { + width: 78%; +} + +.width-79 { + width: 79%; +} + +.width-80 { + width: 80%; +} + +.width-81 { + width: 81%; +} + +.width-82 { + width: 82%; +} + +.width-83 { + width: 83%; +} + +.width-84 { + width: 84%; +} + +.width-85 { + width: 85%; +} + +.width-86 { + width: 86%; +} + +.width-87 { + width: 87%; +} + +.width-88 { + width: 88%; +} + +.width-89 { + width: 89%; +} + +.width-90 { + width: 90%; +} + +.width-91 { + width: 91%; +} + +.width-92 { + width: 92%; +} + +.width-93 { + width: 93%; +} + +.width-94 { + width: 94%; +} + +.width-95 { + width: 95%; +} + +.width-96 { + width: 96%; +} + +.width-97 { + width: 97%; +} + +.width-98 { + width: 98%; +} + +.width-99 { + width: 99%; +} + +.width-100 { + width: 100%; +} + +.view-covered-by-tests{ + cursor:pointer; + color:blue; + text-decoration:underline; +} + +.view-covered-by-tests:hover{ + text-decoration:none; + text-shadow: 1px 1px 1px #555; +} \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml new file mode 100644 index 0000000..164af6a --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/TEST-at.werkstatt.crm.gen.RechnungGeneratedTest.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt new file mode 100644 index 0000000..b87478f --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/measurements/repaired/surefire-reports/at.werkstatt.crm.gen.RechnungGeneratedTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: at.werkstatt.crm.gen.RechnungGeneratedTest +------------------------------------------------------------------------------- +Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.193 s -- in at.werkstatt.crm.gen.RechnungGeneratedTest diff --git a/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/repaired/RechnungGeneratedTest.java b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/repaired/RechnungGeneratedTest.java new file mode 100644 index 0000000..a798f54 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/repaired/RechnungGeneratedTest.java @@ -0,0 +1,148 @@ +package at.werkstatt.crm.gen; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; + +import at.werkstatt.crm.model.Rechnung; + +import java.util.Date; + +import static org.assertj.core.api.Assertions.assertThat; + +class RechnungGeneratedTest { + + private Rechnung rechnung; + + @BeforeEach + void setUp() { + rechnung = new Rechnung(); + } + + @Test + void defaultConstructorInitializesAllFieldsToNullOrFalse() { + assertThat(rechnung.getId()).isNull(); + assertThat(rechnung.getRechnungNr()).isNull(); + assertThat(rechnung.getAuftragId()).isNull(); + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(0.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(0.0); + assertThat(rechnung.isBezahlt()).isFalse(); + assertThat(rechnung.getBezahltAm()).isNull(); + assertThat(rechnung.getAuftragNr()).isNull(); + assertThat(rechnung.getKundeName()).isNull(); + } + + @Test + void settersAndGettersWorkCorrectly() { + Long id = 1L; + String rechnungNr = "R2024-001"; + Long auftragId = 100L; + Date ausgestelltAm = new Date(); + double summeNetto = 100.50; + double ust = 20.10; + double summeBrutto = 120.60; + boolean bezahlt = true; + Date bezahltAm = new Date(); + String auftragNr = "A2024-50"; + String kundeName = "Max Mustermann"; + + rechnung.setId(id); + rechnung.setRechnungNr(rechnungNr); + rechnung.setAuftragId(auftragId); + rechnung.setAusgestelltAm(ausgestelltAm); + rechnung.setSummeNetto(summeNetto); + rechnung.setUst(ust); + rechnung.setSummeBrutto(summeBrutto); + rechnung.setBezahlt(bezahlt); + rechnung.setBezahltAm(bezahltAm); + rechnung.setAuftragNr(auftragNr); + rechnung.setKundeName(kundeName); + + assertThat(rechnung.getId()).isEqualTo(id); + assertThat(rechnung.getRechnungNr()).isEqualTo(rechnungNr); + assertThat(rechnung.getAuftragId()).isEqualTo(auftragId); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(ausgestelltAm); + assertThat(rechnung.getSummeNetto()).isEqualTo(summeNetto); + assertThat(rechnung.getUst()).isEqualTo(ust); + assertThat(rechnung.getSummeBrutto()).isEqualTo(summeBrutto); + assertThat(rechnung.isBezahlt()).isTrue(); + assertThat(rechnung.getBezahltAm()).isEqualTo(bezahltAm); + assertThat(rechnung.getAuftragNr()).isEqualTo(auftragNr); + assertThat(rechnung.getKundeName()).isEqualTo(kundeName); + } + + @Test + void doubleValuesCanBeSetToZeroAndNegative() { + rechnung.setSummeNetto(0.0); + rechnung.setUst(-5.0); + rechnung.setSummeBrutto(-10.5); + + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(-5.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(-10.5); + } + + @Test + void booleanBezahltCanBeSetToFalse() { + rechnung.setBezahlt(false); + assertThat(rechnung.isBezahlt()).isFalse(); + } + + @Test + void dateFieldsCanBeSetToNull() { + rechnung.setAusgestelltAm(null); + rechnung.setBezahltAm(null); + + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getBezahltAm()).isNull(); + } + + @Test + void stringFieldsCanBeSetToEmptyString() { + rechnung.setRechnungNr(""); + rechnung.setAuftragNr(""); + rechnung.setKundeName(""); + + assertThat(rechnung.getRechnungNr()).isEqualTo(""); + assertThat(rechnung.getAuftragNr()).isEqualTo(""); + assertThat(rechnung.getKundeName()).isEqualTo(""); + } + + @Test + void allFieldsCanBeSetInSequenceAndRetrievedConsistently() { + rechnung.setId(42L); + assertThat(rechnung.getId()).isEqualTo(42L); + + rechnung.setRechnungNr("R-2024-123"); + assertThat(rechnung.getRechnungNr()).isEqualTo("R-2024-123"); + + rechnung.setAuftragId(999L); + assertThat(rechnung.getAuftragId()).isEqualTo(999L); + + Date now = new Date(); + rechnung.setAusgestelltAm(now); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(now); + + rechnung.setSummeNetto(123.456); + assertThat(rechnung.getSummeNetto()).isEqualTo(123.456); + + rechnung.setUst(24.691); + assertThat(rechnung.getUst()).isEqualTo(24.691); + + rechnung.setSummeBrutto(148.147); + assertThat(rechnung.getSummeBrutto()).isEqualTo(148.147); + + rechnung.setBezahlt(true); + assertThat(rechnung.isBezahlt()).isTrue(); + + rechnung.setBezahltAm(now); + assertThat(rechnung.getBezahltAm()).isEqualTo(now); + + rechnung.setAuftragNr("A-2024-777"); + assertThat(rechnung.getAuftragNr()).isEqualTo("A-2024-777"); + + rechnung.setKundeName("Erika Musterfrau"); + assertThat(rechnung.getKundeName()).isEqualTo("Erika Musterfrau"); + } +} diff --git a/ai-testgen/runs/2026-07-31/repair-effort.csv b/ai-testgen/runs/2026-07-31/repair-effort.csv new file mode 100644 index 0000000..4544424 --- /dev/null +++ b/ai-testgen/runs/2026-07-31/repair-effort.csv @@ -0,0 +1,12 @@ +cell,startedAt,endedAt,minutes +M1-A-s4-rechnung,2026-08-02T10:49:00+02:00,2026-08-02T10:51:45+02:00,2.8 +M2-A-s1-werkstattservice,2026-08-02T10:49:01+02:00,2026-08-02T11:17:07+02:00,28.1 +M2-A-s2-auftrag,2026-08-02T10:48:59+02:00,2026-08-02T11:13:42+02:00,24.7 +M2-A-s3-admin,2026-08-02T10:48:59+02:00,2026-08-02T11:14:20+02:00,25.4 +M2-A-s4-rechnung,2026-08-02T10:49:00+02:00,2026-08-02T10:50:31+02:00,1.5 +M2-B-s1-werkstattservice,2026-08-02T10:49:00+02:00,2026-08-02T10:58:25+02:00,9.4 +M2-B-s2-auftrag,2026-08-02T10:50:46+02:00,2026-08-02T11:16:03+02:00,25.3 +M2-B-s2-kunden,2026-08-02T10:52:09+02:00,2026-08-02T11:12:47+02:00,20.6 +M2-B-s2-rechnung,2026-08-02T10:59:02+02:00,2026-08-02T11:12:04+02:00,13.0 +M2-B-s3-admin,2026-08-02T11:12:28+02:00,2026-08-02T11:13:52+02:00,1.4 +M2-B-s4-rechnung,2026-08-02T11:13:18+02:00,2026-08-02T11:15:05+02:00,1.8 diff --git a/docs/DEVIATIONS.md b/docs/DEVIATIONS.md index 5e4eca6..ba9986e 100644 --- a/docs/DEVIATIONS.md +++ b/docs/DEVIATIONS.md @@ -14,7 +14,7 @@ Status values: **deferred(stage)** = lands in a named stage · **deferred(post-v | Standard (DoD) | Status | Disposition | |---|---|---| -| Coverage-Gate ≥ 80 % auf Neucode | **partially met** (2026-07-31, G6), rest deferred(G6-Durchführung) | Armed as a **ratchet**, not as the §3 target: JaCoCo runs in `modern/verify` and fails the build below the value the module's first suite actually reaches (**measured 37.3 % line / 14.2 % branch** on 2026-07-31, gate set to 35 % to absorb jitter). Coverage can no longer fall. The 80 % target follows when the repaired ai-testgen tests are adopted into `modern/src/test` (ADR-0010) — a threshold nobody has ever reached is decoration, and pretending otherwise is what produces `-DskipTests`. | +| Coverage-Gate ≥ 80 % auf Neucode | **met** (2026-08-02, G6) — line only, branch still open | Armed as a **ratchet** throughout, always just below a *measured* value and then pulled up. 2026-07-31: the module's first suite reached 37.3 % line / 14.2 % branch → gate 0.35. 2026-08-02: the repaired G6 corpus-B tests were adopted into `modern/src/test` under [ADR-0011](adr/0011-adopting-generated-tests.md) — 88 test methods, 99 green in the module — and coverage measured **81.3 % line / 58.3 % branch** → gate raised to **0.80**. That is the first time §3's 80 % is *reached* rather than declared. **Two things stay open and are not hidden by the number:** the gate limits **lines only** (branch coverage lags 23 points behind and gets a limit in the same pass that improves the God-class suite), and the adopted `WerkstattService` suite has a **44.1 % mutation score** — high line coverage over the riskiest class with half the injected faults surviving. Coverage went up; the God class is still the weak spot, by measurement. | | Security-Scan in CI | partially met, rest deferred(G7) | Since 2026-07-30: Dependabot (modern/e2e/characterization + actions; since 2026-07-31 also **npm for `modern/frontend`** — stage 5 had opened the ecosystem without scanning it, caught by review session 10; `legacy/` **excluded on purpose** — its EOL dependencies are the exhibit). Full OWASP dependency-check/image scanning lands with the ops stage G7. | | AuthN/AuthZ (OAuth2/OIDC, Keycloak) — §4 | deferred, **owner re-scoping needed** | The 2016 app has no auth at all; adding it changes every pinned contract, so it cannot happen as a side effect (ADR-0004 gate). Recorded honestly instead of silently (review session 10): the modern stand — including the destructive `POST /admin/bereinigen` the JSP wart B16 bequeathed — is unauthenticated by inherited design. **Hard requirement for G7:** the public demo deployment must protect `/admin` at minimum (reverse-proxy auth counts); full OAuth2/OIDC per §4 needs an owner-scoped stage of its own plus the §9 auth ADR. | | Security-Header, CSRF-Schutz, Rate Limiting — §4 | deferred(G7) | None configured on either stand. Land with the deployment stage where the public endpoint exists; local dev stands are loopback-bound. Silent until 2026-07-31 (review session 10). | diff --git a/docs/adr/0011-adopting-generated-tests.md b/docs/adr/0011-adopting-generated-tests.md new file mode 100644 index 0000000..adf8200 --- /dev/null +++ b/docs/adr/0011-adopting-generated-tests.md @@ -0,0 +1,82 @@ +# ADR-0011 — Adopting repaired AI-generated tests into `modern/src/test` + +**Status:** accepted · **Date:** 2026-08-02 · **Milestone:** G6 (closing step) +**Context:** [ADR-0010](0010-ai-testgen-scope-corpus-b-and-agent-repair.md) foresaw this decision; +[`ai-testgen/PROTOCOL.md`](../../ai-testgen/PROTOCOL.md) §4 requires it to be a **separate step +after the experiment**, with the run artifacts left immutable. + +## Context + +G6 produced, for corpus B (`modern/`), twelve generated test classes — six units × two model arms +— of which eleven compile and pass after Phase-B repair. `modern/` itself had 11 tests (5 ArchUnit ++ 6 Testcontainers) and a coverage ratchet armed at 35 %, well under the 80 % that +`ENGINEERING_STANDARDS.md` §3 requires. `docs/DEVIATIONS.md` records the 80 % target as reachable +"when the repaired ai-testgen tests are adopted". + +Adopting all of them would be the obvious move and the wrong one. Phase B measured that for +`AuftragController` the two arms produced **13** and **134** test methods with **identical** +measured value — 21/21 lines, 2/2 branches, 13/13 mutants. Adopting the larger class would import +121 test methods that find nothing and must be maintained forever. + +## Decision + +**Adopt exactly one class per unit, chosen by a rule fixed before looking at which arm it favours:** + +1. Only corpus B (these are tests for `modern/`), and only cells that are green after Phase B. +2. Highest **PIT mutation score** wins — the measure of what a test actually catches. +3. **Ties go to the class with fewer test methods.** Equal fault detection at lower maintenance + cost is strictly better, and every controller tie in this experiment was exactly that. + +Applied mechanically, the rule selects a **mixed** set — two classes from the frontier arm, four +from the open-weight arm — which is the sign one wants that it is not a preference in disguise: + +| Unit | Adopted from | Tests | Mutation score | +|---|---|---|---| +| `WerkstattService` (God class) | M2 `qwen/qwen3-coder-next` | 40 | 49/111 = 44.1 % | +| `AuftragController` | M1 `anthropic/claude-sonnet-5` | 13 | 13/13 = 100 % | +| `KundenController` | M1 `anthropic/claude-sonnet-5` | 13 | 17/17 = 100 % | +| `RechnungController` | M2 `qwen/qwen3-coder-next` | 9 | 8/8 = 100 % | +| `AdminController` | M2 `qwen/qwen3-coder-next` | 6 | 2/2 = 100 % | +| `Rechnung` | M2 `qwen/qwen3-coder-next` | 7 | 12/12 = 100 % | + +**88 test methods adopted**, in package `at.werkstatt.crm.gen`, each file carrying a provenance +header naming its run, arm, corpus and measured numbers. The 134-method class is **not** adopted; +rule 3 rejected it, and that rejection is the most valuable thing the rule does. + +**Consequences for the ratchet.** Measured after adoption: **81.3 % line, 58.3 % branch** +(from 37.3 % / 14.2 %), 99 tests green. The ratchet moves **0.35 → 0.80**. This is the first +time the standard's 80 % target is *reached* rather than *declared* — and it is still set just +below a measured value, never above one. + +## The honest part + +- **These tests were not written by a human.** They were generated, then repaired by an AI agent + under supervision, and every file says so in its header. From adoption onward they are ordinary + repo code: editable, and bound by the rule that the suite stays green. +- **They pin behaviour; they do not audit it.** Phase B recorded **zero `BUG-FOUND`** across 15 + wrong-expectation repairs — not one generated test caught a real defect. Their value is + regression safety, and they sit *underneath* the characterization and E2E layers, which remain + the definition of functional equivalence. They do not replace either. +- **The God-class suite is the weak one, and it is also the one that matters.** 40 tests, 88.8 % + line coverage on `WerkstattService` — and a **44.1 % mutation score**, meaning roughly half of + injected faults survive it. It is adopted because half a net is better than none over the + project's riskiest class, and it is flagged here so nobody reads the new 81 % coverage number as + "the God class is covered". A follow-up that raises *that* mutation score by hand is worth more + than any further generated tests. +- **Branch coverage (58.3 %) lags line coverage (81.3 %) by 23 points.** The ratchet gates lines + only, inherited from the earlier configuration. Adding a branch limit is deferred rather than + smuggled in: it belongs in the same pass that improves the God-class suite. +- **The experiment artifacts under `ai-testgen/runs/2026-07-31/` are untouched and stay + immutable.** The adopted files are copies. If they diverge later — and they should, when someone + improves them — the run still records exactly what the models produced. + +## Alternatives rejected + +- **Adopt everything (12 classes).** Rejected: imports the 134-method class whose measured value + is identical to a 13-method one. "More tests" is not the goal; the experiment measured that. +- **Adopt nothing, write tests by hand.** Rejected: it discards a working, measured suite and + leaves the 80 % obligation open for another milestone, with no evidence that hand-written tests + would be better — the controller suites already kill 100 % of mutants. +- **Adopt only the 100 %-mutation classes** (i.e. drop the God class). Rejected: it would produce + a flattering coverage number by excluding precisely the class the project is about. The weak + suite is disclosed instead of dropped. diff --git a/docs/worklog.md b/docs/worklog.md index 9b740cf..6bf4829 100644 --- a/docs/worklog.md +++ b/docs/worklog.md @@ -799,3 +799,110 @@ re-generated, re-prompted or excluded. (compile/pass/coverage/mutation after repair + repair effort per category) and decide on adopting the repaired corpus-B tests into `modern/src/test` (ADR-0010), which is what raises the coverage ratchet toward the §3 target of 80 %. + +--- + +## 2026-08-02 — G6 part 3: Phase B measured, G6 closed; plus the missing deployment docs — session 13 + +Two independent tracks in one session: finishing G6, and the documentation work the +owner asked for after losing time on manual steps. + +### Track A — G6 Phase B + +**Method decisions written down BEFORE the repair, as amendment A2** (the protocol +only allows amendments for steps not yet executed, and this was the last moment): +mutually blind parallel repairers one per cell; **repair may not add a test the model +did not write**; a cell whose recorded output is the literal `null` is `ABANDONED` at +zero minutes and must not be averaged in; truncated output is salvaged, never completed. + +**Executed:** 11 repairable cells, one isolated agent each, own worktree, own clock, +live fix log, 30-minute cap. 13 cells needed nothing. **A2.2 compliance was verified +mechanically, not asserted** — `@Test` counts are identical in all 24 cells before and +after, the sole exception being the A2.4 salvage that dropped one cut-off method. + +**Result — and it is the unflattering one:** + +| | Phase A | Phase B | +|---|---|---| +| green cells | 12/24 | **21/24** | +| test methods | 154 (3 red) | **421 (0 red)** | +| line / branch coverage | 100 % / 100 % | **90.5 % / 78.8 %** | +| mutation score | 99.2 % | **73.2 %** | + +The quality metrics got **worse**, because Phase A's perfect figures were computed only +over the cells that happened to compile — exclusively the small controllers. The God +class was not in the denominator. **Phase A was survivorship bias**, and only the +protocol's insistence on measuring every failed cell to the end made that visible. +Repaired, the God class reaches ~83 % line coverage at a **44–56 % mutation score**: +roughly half the injected faults survive the class the whole experiment is about. + +Three further findings: one model wrote **134 test methods** where the other wrote 13, +with byte-identical measured value (21/21 lines, 13/13 mutants); across 15 +wrong-expectation repairs there were **zero** real defects found in the production code; +and the open-weight model emitted `getStatusCodeValue()`, present in corpus A's Spring 4.3 +and **removed** in corpus B's Spring 7 — migrating to a very new stack makes LLM support +temporarily worse. + +**Two defects found in our own work, both disclosed rather than quietly fixed:** + +- **A3 — one cell in 24 was decided by our extraction rule, not by the model.** Arm M1 / + corpus A / `Rechnung`: the model wrote a draft, rejected it in plain text (*"Wait, I need + to produce the correct final answer without mistakes"*), then wrote a correct 26-test + class. Our pre-registered "first fenced block" rule kept the draft. **The cell was not + re-extracted and the 12/24 rate stands** — a rule does not become wrong because it cost a + point. All 24 responses were scanned; exactly one is affected. The REPORT's failure + taxonomy is corrected: that row described the artifact correctly and the model wrongly. +- **A4 — the repair-effort clock is contaminated by our own design.** A2.1's parallelism + had up to six agents sharing an 8-core machine, all invoking Maven; one cell recorded + 24.7 wall-clock minutes for a build that worked 5.6 seconds. The fix-log timestamps + cannot rescue it either — several repairers batched their writes instead of logging live + as §6 requires. Minutes are published as a measured **upper bound**; the transferable + figures are the 52 fixes and their categories (19 IMPORT/SYNTAX, 17 MOCKING-SETUP, + 15 WRONG-EXPECTATION, 1 STRUCTURAL, **0 BUG-FOUND**). A2.1 traded a known confound for + an unexamined one — that is written down as ours, in the protocol. + +**Adoption (ADR-0011):** one class per unit, highest mutation score, ties to **fewer test +methods** — the rule that rejects the 134-method class. It selected a mixed set (2 frontier, +4 open-weight), which is the sign it is not a preference in disguise. 88 methods adopted, +**99 module tests green**, coverage **37.3 % → 81.3 % line**, ratchet 0.35 → **0.80**. §3's +80 % target is reached rather than declared for the first time. Stated next to it: branch +coverage still lags 23 points and the adopted God-class suite has a 44.1 % mutation score. + +### Track B — the deployment documentation + +`ENGINEERING_STANDARDS.md` §7 has always required `docs/deployment.md`. **It did not exist, +and the gap was not in `DEVIATIONS.md` either** — found by a doc audit, not by the ledger, +which is the more serious half. Written now, every command executed before being written +down, plus `docs/MANUAL_TASKS.md` as the by-hand checklist. Production deployment gets **no +invented steps**: §10 states what does not exist and enumerates the open items. + +Beginner-fatal defects fixed: **`--wait` was missing from every human quickstart** while all +three CI workflows always used it (the single highest-frequency way to lose an hour here); +**characterization silently ignored `-Dtarget`**, so `-Dtarget=modern` went green against the +*legacy* stand — an equivalence proof that proved nothing, now a fail-fast; modern `verify` +needs a Docker daemon and nothing said so. Also corrected: the `legacy/` build failure is +**not** the Java 8 source level — measured on JDK 26, `compile` and `surefire` succeed and it +dies in `maven-war-plugin:2.6` reflecting into `java.util` internals JDK 16 sealed. + +**Dead end, logged rather than deleted:** the first repair fan-out was launched without +worktree isolation — 11 agents would have collided in one testbed. Aborted after ~1 minute, +before any repair ran; the started clocks were discarded and the run restarted clean. No +measurement was contaminated. + +**Verification:** modern `verify` green with 99 tests and the 0.80 ratchet · harness 24/24 · +characterization green vs legacy and vs modern, and the new `-Dtarget` guard verified to fire · +e2e green vs both stands · all 24 cells re-measured through the unmodified `measure.sh`. + +**Hours:** 2.5 *(measured wall time 10:42 first tool call → 13:0x commit; agent wall-clock +under supervision, see the header. Includes both tracks and the two workflow fan-outs.)* + +**Decisions:** amendments A2 (pre-Phase-B method), A3 and A4 (post-hoc disclosures); +ADR-0011 (adoption rule + ratchet to 0.80); `docs/deployment.md` and `docs/MANUAL_TASKS.md` +created; two DEVIATIONS rows added, one closed. + +**Next: G7 — stage 6 (cloud/ops + launch).** OTel, Actuator health instead of the TCP probes, +deployment of both stands (Hetzner + Dokploy), playbook closing chapter + PDF export in CI, +README final, release v1.0.0, tag `stage-6-cloud-ops`. Two hard preconditions already +registered: neither stand has authentication (including the destructive +`POST /admin/bereinigen`), and PostgreSQL 9.6 is end-of-life. `docs/deployment.md` §10 is the +work list. diff --git a/modern/pom.xml b/modern/pom.xml index a26cb57..a100b69 100644 --- a/modern/pom.xml +++ b/modern/pom.xml @@ -24,10 +24,15 @@ UTF-8 UTF-8 25 - - 0.35 + + 0.80 diff --git a/modern/src/test/java/at/werkstatt/crm/gen/AdminControllerGeneratedTest.java b/modern/src/test/java/at/werkstatt/crm/gen/AdminControllerGeneratedTest.java new file mode 100644 index 0000000..5f9989e --- /dev/null +++ b/modern/src/test/java/at/werkstatt/crm/gen/AdminControllerGeneratedTest.java @@ -0,0 +1,134 @@ +// ADOPTED FROM THE G6 EXPERIMENT — see docs/adr/0011-adopting-generated-tests.md +// +// Provenance: ai-testgen run 2026-07-31, arm M2 (qwen_qwen3-coder-next), corpus B, unit +// s3-admincontroller, +// as generated by the model and then repaired under PROTOCOL.md §6 Phase B. +// Measured at adoption: 6 test methods, mutation score 2/2 = 100%. +// +// The immutable experiment artifact is +// `ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s3-admincontroller/`. +// This copy is ordinary repo code from here on: it may be edited, and it must stay green. +// It was NOT written by a human, and no test method was added during repair (amendment A2.2). +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.AdminController; +import at.werkstatt.crm.service.WerkstattService; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class AdminControllerGeneratedTest { + + @Mock private WerkstattService werkstattService; + + private AdminController adminController; + + @BeforeEach + void setUp() { + adminController = new AdminController(werkstattService, "TestFirma", "1.2.3"); + } + + @Test + void statistik_returnsExpectedStructure_whenCalled() { + // Arrange + Map expectedStatistik = new HashMap<>(); + expectedStatistik.put("kunden", 10); + expectedStatistik.put("fahrzeuge", 15); + expectedStatistik.put("auftraege", 20); + when(werkstattService.getAdminStatistik()).thenReturn(expectedStatistik); + + // Act + Map result = adminController.statistik(); + + // Assert + assertThat(result).hasSize(3); + assertThat(result).containsEntry("firmaName", "TestFirma"); + assertThat(result).containsEntry("version", "1.2.3"); + assertThat(result).containsEntry("statistik", expectedStatistik); + } + + @Test + void statistik_returnsEmptyStatistik_whenServiceReturnsEmptyMap() { + // Arrange + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + + // Act + Map result = adminController.statistik(); + + // Assert + assertThat(result).hasSize(3); + assertThat(result).containsEntry("firmaName", "TestFirma"); + assertThat(result).containsEntry("version", "1.2.3"); + assertThat(result).containsEntry("statistik", new HashMap<>()); + } + + @Test + void bereinigen_returnsCorrectCountAndMessage_whenDeletionsSuccess() { + // Arrange + int deletedCount = 5; + when(werkstattService.bereinigeStornierte()).thenReturn(deletedCount); + + // Act + Map result = adminController.bereinigen(); + + // Assert + assertThat(result).hasSize(2); + assertThat(result).containsEntry("geloescht", deletedCount); + assertThat(result) + .containsEntry("meldung", deletedCount + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_handlesZeroDeletionsCorrectly() { + // Arrange + int deletedCount = 0; + when(werkstattService.bereinigeStornierte()).thenReturn(deletedCount); + + // Act + Map result = adminController.bereinigen(); + + // Assert + assertThat(result).hasSize(2); + assertThat(result).containsEntry("geloescht", deletedCount); + assertThat(result) + .containsEntry("meldung", deletedCount + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void bereinigen_handlesLargeDeletionCount() { + // Arrange + int deletedCount = 1000; + when(werkstattService.bereinigeStornierte()).thenReturn(deletedCount); + + // Act + Map result = adminController.bereinigen(); + + // Assert + assertThat(result).hasSize(2); + assertThat(result).containsEntry("geloescht", deletedCount); + assertThat(result) + .containsEntry("meldung", deletedCount + " stornierte Aufträge wurden endgültig gelöscht."); + } + + @Test + void constructor_injectsAllDependenciesCorrectly() { + // Arrange & Act + AdminController controller = new AdminController(werkstattService, "FirmaX", "2.0"); + + // Assert + assertThat(controller).isNotNull(); + // Note: We cannot directly access private fields, but we can verify behavior via public methods + when(werkstattService.getAdminStatistik()).thenReturn(new HashMap<>()); + Map stat = controller.statistik(); + assertThat(stat).containsEntry("firmaName", "FirmaX"); + assertThat(stat).containsEntry("version", "2.0"); + } +} diff --git a/modern/src/test/java/at/werkstatt/crm/gen/AuftragControllerGeneratedTest.java b/modern/src/test/java/at/werkstatt/crm/gen/AuftragControllerGeneratedTest.java new file mode 100644 index 0000000..00a1e6b --- /dev/null +++ b/modern/src/test/java/at/werkstatt/crm/gen/AuftragControllerGeneratedTest.java @@ -0,0 +1,193 @@ +// ADOPTED FROM THE G6 EXPERIMENT — see docs/adr/0011-adopting-generated-tests.md +// +// Provenance: ai-testgen run 2026-07-31, arm M1 (anthropic_claude-sonnet-5), corpus B, unit +// s2-auftragcontroller, +// as generated by the model and then repaired under PROTOCOL.md §6 Phase B. +// Measured at adoption: 13 test methods, mutation score 13/13 = 100%. +// +// The immutable experiment artifact is +// `ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-auftragcontroller/`. +// This copy is ordinary repo code from here on: it may be edited, and it must stay green. +// It was NOT written by a human, and no test method was added during repair (amendment A2.2). +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.AuftragController; +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.service.WerkstattService; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +@ExtendWith(MockitoExtension.class) +class AuftragControllerGeneratedTest { + + @Mock private WerkstattService werkstattService; + + private AuftragController controller; + + @BeforeEach + void setUp() { + controller = new AuftragController(werkstattService); + } + + @Test + void liste_returnsAuftraegeFromService_withStatus() { + List expected = List.of(mock(Auftrag.class)); + when(werkstattService.getAuftraege("ANGENOMMEN")).thenReturn(expected); + + List result = controller.liste("ANGENOMMEN"); + + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAuftraege("ANGENOMMEN"); + } + + @Test + void liste_returnsAuftraegeFromService_withNullStatus() { + List expected = Collections.emptyList(); + when(werkstattService.getAuftraege(null)).thenReturn(expected); + + List result = controller.liste(null); + + assertThat(result).isEmpty(); + verify(werkstattService).getAuftraege(null); + } + + @Test + void einzeln_returnsOk_whenAuftragFound() { + Auftrag auftrag = mock(Auftrag.class); + when(werkstattService.getAuftrag(1L)).thenReturn(auftrag); + + ResponseEntity response = controller.einzeln(1L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(auftrag); + } + + @Test + void einzeln_returnsNotFound_whenAuftragMissing() { + when(werkstattService.getAuftrag(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); + assertThat(response.getBody()).isNull(); + } + + @Test + void anlegen_returnsOk_withCreatedAuftrag() { + Auftrag input = mock(Auftrag.class); + Auftrag created = mock(Auftrag.class); + when(werkstattService.neuerAuftrag(input)).thenReturn(created); + + ResponseEntity response = controller.anlegen(input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(created); + } + + @Test + void anlegen_returnsServerError_whenServiceThrows() { + Auftrag input = mock(Auftrag.class); + when(werkstattService.neuerAuftrag(input)) + .thenThrow(new RuntimeException("Fehler beim Anlegen")); + + ResponseEntity response = controller.anlegen(input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Fehler beim Anlegen"); + } + + @Test + void status_returnsOk_withUpdatedAuftrag() { + Auftrag updated = mock(Auftrag.class); + when(werkstattService.setzeStatus(5L, "FERTIG")).thenReturn(updated); + + ResponseEntity response = controller.status(5L, "FERTIG"); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(updated); + } + + @Test + void status_returnsServerError_whenServiceThrows() { + when(werkstattService.setzeStatus(5L, "UNBEKANNT")) + .thenThrow(new RuntimeException("Ungueltiger Status")); + + ResponseEntity response = controller.status(5L, "UNBEKANNT"); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Ungueltiger Status"); + } + + @Test + void position_returnsOk_withCreatedPosition() { + AuftragPosition input = mock(AuftragPosition.class); + AuftragPosition created = mock(AuftragPosition.class); + when(werkstattService.neuePosition(3L, input)).thenReturn(created); + + ResponseEntity response = controller.position(3L, input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isEqualTo(created); + } + + @Test + void position_returnsServerError_whenServiceThrows() { + AuftragPosition input = mock(AuftragPosition.class); + when(werkstattService.neuePosition(3L, input)) + .thenThrow(new RuntimeException("Auftrag nicht gefunden")); + + ResponseEntity response = controller.position(3L, input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Auftrag nicht gefunden"); + } + + @Test + void positionLoeschen_returnsOk_whenSuccessful() { + doNothing().when(werkstattService).loeschePosition(7L); + + ResponseEntity response = controller.positionLoeschen(7L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(response.getBody()).isNull(); + verify(werkstattService).loeschePosition(7L); + } + + @Test + void positionLoeschen_returnsServerError_whenServiceThrows() { + doThrow(new RuntimeException("Position nicht gefunden")) + .when(werkstattService) + .loeschePosition(8L); + + ResponseEntity response = controller.positionLoeschen(8L); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isEqualTo("Position nicht gefunden"); + } + + @Test + void anlegen_returnsServerError_withNullMessage_whenExceptionMessageIsNull() { + Auftrag input = mock(Auftrag.class); + when(werkstattService.neuerAuftrag(input)).thenThrow(new RuntimeException()); + + ResponseEntity response = controller.anlegen(input); + + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(response.getBody()).isNull(); + } +} diff --git a/modern/src/test/java/at/werkstatt/crm/gen/KundenControllerGeneratedTest.java b/modern/src/test/java/at/werkstatt/crm/gen/KundenControllerGeneratedTest.java new file mode 100644 index 0000000..f4fbe74 --- /dev/null +++ b/modern/src/test/java/at/werkstatt/crm/gen/KundenControllerGeneratedTest.java @@ -0,0 +1,202 @@ +// ADOPTED FROM THE G6 EXPERIMENT — see docs/adr/0011-adopting-generated-tests.md +// +// Provenance: ai-testgen run 2026-07-31, arm M1 (anthropic_claude-sonnet-5), corpus B, unit +// s2-kundencontroller, +// as generated by the model and then repaired under PROTOCOL.md §6 Phase B. +// Measured at adoption: 13 test methods, mutation score 17/17 = 100%. +// +// The immutable experiment artifact is +// `ai-testgen/runs/2026-07-31/anthropic_claude-sonnet-5/B/s2-kundencontroller/`. +// This copy is ordinary repo code from here on: it may be edited, and it must stay green. +// It was NOT written by a human, and no test method was added during repair (amendment A2.2). +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import at.werkstatt.crm.controller.KundenController; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.service.WerkstattService; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.ResponseEntity; + +@ExtendWith(MockitoExtension.class) +class KundenControllerGeneratedTest { + + @Mock private WerkstattService werkstattService; + + private KundenController controller; + + @BeforeEach + void setUp() { + controller = new KundenController(werkstattService); + } + + @Test + void liste_ohneSuche_gibtAlleKundenZurueck() { + List alle = List.of(new Kunde(), new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = controller.liste(null); + + assertThat(result).isSameAs(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void liste_mitLeererSuche_gibtAlleKundenZurueck() { + List alle = List.of(new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = controller.liste(" "); + + assertThat(result).isSameAs(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void liste_mitLeerstring_gibtAlleKundenZurueck() { + List alle = List.of(new Kunde()); + when(werkstattService.getAlleKunden()).thenReturn(alle); + + List result = controller.liste(""); + + assertThat(result).isSameAs(alle); + verify(werkstattService).getAlleKunden(); + verify(werkstattService, never()).sucheKunden(anyString()); + } + + @Test + void liste_mitSuchbegriff_gibtGefundeneKundenZurueck() { + List gefunden = List.of(new Kunde()); + when(werkstattService.sucheKunden("Mueller")).thenReturn(gefunden); + + List result = controller.liste(" Mueller "); + + assertThat(result).isSameAs(gefunden); + verify(werkstattService).sucheKunden("Mueller"); + verify(werkstattService, never()).getAlleKunden(); + } + + @Test + void einzeln_kundeVorhanden_gibtOkMitKundeZurueck() { + Kunde kunde = new Kunde(); + kunde.setId(5L); + when(werkstattService.getKunde(5L)).thenReturn(kunde); + + ResponseEntity response = controller.einzeln(5L); + + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isSameAs(kunde); + } + + @Test + void einzeln_kundeNichtVorhanden_gibtNotFoundZurueck() { + when(werkstattService.getKunde(99L)).thenReturn(null); + + ResponseEntity response = controller.einzeln(99L); + + assertThat(response.getStatusCode().value()).isEqualTo(404); + assertThat(response.getBody()).isNull(); + } + + @Test + void fahrzeuge_gibtListeZurueck() { + List fahrzeuge = List.of(new Fahrzeug(), new Fahrzeug()); + when(werkstattService.getFahrzeugeZuKunde(7L)).thenReturn(fahrzeuge); + + List result = controller.fahrzeuge(7L); + + assertThat(result).isSameAs(fahrzeuge); + verify(werkstattService).getFahrzeugeZuKunde(7L); + } + + @Test + void fahrzeuge_leereListe() { + when(werkstattService.getFahrzeugeZuKunde(1L)).thenReturn(Collections.emptyList()); + + List result = controller.fahrzeuge(1L); + + assertThat(result).isEmpty(); + } + + @Test + void anlegen_setztIdAufNullUndSpeichert() { + Kunde eingabe = new Kunde(); + eingabe.setId(123L); + Kunde gespeichert = new Kunde(); + gespeichert.setId(1L); + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(gespeichert); + + Kunde result = controller.anlegen(eingabe); + + assertThat(eingabe.getId()).isNull(); + assertThat(result).isSameAs(gespeichert); + verify(werkstattService).speichereKunde(eingabe); + } + + @Test + void aendern_erfolgreich_gibtOkMitGespeichertemKundeZurueck() { + Kunde eingabe = new Kunde(); + Kunde gespeichert = new Kunde(); + gespeichert.setId(10L); + when(werkstattService.speichereKunde(any(Kunde.class))).thenReturn(gespeichert); + + ResponseEntity response = controller.aendern(10L, eingabe); + + assertThat(eingabe.getId()).isEqualTo(10L); + assertThat(response.getStatusCode().value()).isEqualTo(200); + assertThat(response.getBody()).isSameAs(gespeichert); + verify(werkstattService).speichereKunde(eingabe); + } + + @Test + void aendern_serviceWirftException_gibtStatus500MitFehlermeldungZurueck() { + Kunde eingabe = new Kunde(); + when(werkstattService.speichereKunde(any(Kunde.class))) + .thenThrow(new RuntimeException("Speicherfehler")); + + ResponseEntity response = controller.aendern(3L, eingabe); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Speicherfehler"); + assertThat(eingabe.getId()).isEqualTo(3L); + } + + @Test + void loeschen_erfolgreich_gibtOkZurueck() { + doNothing().when(werkstattService).loescheKunde(4L); + + ResponseEntity response = controller.loeschen(4L); + + assertThat(response.getStatusCode().value()).isEqualTo(200); + verify(werkstattService).loescheKunde(4L); + } + + @Test + void loeschen_serviceWirftException_gibtStatus500MitFehlermeldungZurueck() { + doThrow(new RuntimeException("Kunde referenziert Fahrzeuge")) + .when(werkstattService) + .loescheKunde(8L); + + ResponseEntity response = controller.loeschen(8L); + + assertThat(response.getStatusCode().value()).isEqualTo(500); + assertThat(response.getBody()).isEqualTo("Kunde referenziert Fahrzeuge"); + } +} diff --git a/modern/src/test/java/at/werkstatt/crm/gen/RechnungControllerGeneratedTest.java b/modern/src/test/java/at/werkstatt/crm/gen/RechnungControllerGeneratedTest.java new file mode 100644 index 0000000..5e6bd20 --- /dev/null +++ b/modern/src/test/java/at/werkstatt/crm/gen/RechnungControllerGeneratedTest.java @@ -0,0 +1,179 @@ +// ADOPTED FROM THE G6 EXPERIMENT — see docs/adr/0011-adopting-generated-tests.md +// +// Provenance: ai-testgen run 2026-07-31, arm M2 (qwen_qwen3-coder-next), corpus B, unit +// s2-rechnungcontroller, +// as generated by the model and then repaired under PROTOCOL.md §6 Phase B. +// Measured at adoption: 9 test methods, mutation score 8/8 = 100%. +// +// The immutable experiment artifact is +// `ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s2-rechnungcontroller/`. +// This copy is ordinary repo code from here on: it may be edited, and it must stay green. +// It was NOT written by a human, and no test method was added during repair (amendment A2.2). +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; + +import at.werkstatt.crm.controller.RechnungController; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; +import org.springframework.http.ResponseEntity; + +class RechnungControllerGeneratedTest { + + private WerkstattService werkstattService; + private RechnungController controller; + + @BeforeEach + void setUp() { + werkstattService = Mockito.mock(WerkstattService.class); + controller = new RechnungController(werkstattService); + } + + @Test + void liste_returnsAllRechnungen() { + // Arrange + Rechnung r1 = new Rechnung(); + r1.setId(1L); + Rechnung r2 = new Rechnung(); + r2.setId(2L); + List expected = Arrays.asList(r1, r2); + when(werkstattService.getAlleRechnungen()).thenReturn(expected); + + // Act + List result = controller.liste(); + + // Assert + assertThat(result).isEqualTo(expected); + verify(werkstattService).getAlleRechnungen(); + } + + @Test + void einzeln_returnsRechnung_whenFound() { + // Arrange + Rechnung rechnung = new Rechnung(); + rechnung.setId(1L); + when(werkstattService.getRechnung(1L)).thenReturn(rechnung); + + // Act + ResponseEntity response = controller.einzeln(1L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(rechnung); + verify(werkstattService).getRechnung(1L); + } + + @Test + void einzeln_returnsNotFound_whenRechnungIsNull() { + // Arrange + when(werkstattService.getRechnung(999L)).thenReturn(null); + + // Act + ResponseEntity response = controller.einzeln(999L); + + // Assert + assertThat(response.getStatusCode().is4xxClientError()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).getRechnung(999L); + } + + @Test + void erstellen_returnsCreatedRechnung_whenSuccessful() { + // Arrange + Rechnung created = new Rechnung(); + created.setId(10L); + created.setRechnungNr("R-2025-001"); + when(werkstattService.erstelleRechnung(5L)).thenReturn(created); + + // Act + ResponseEntity response = controller.erstellen(5L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(created); + verify(werkstattService).erstelleRechnung(5L); + } + + @Test + void erstellen_returnsInternalServerError_whenExceptionThrown() { + // Arrange + String errorMsg = "Auftrag nicht gefunden"; + when(werkstattService.erstelleRechnung(999L)).thenThrow(new RuntimeException(errorMsg)); + + // Act + ResponseEntity response = controller.erstellen(999L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).erstelleRechnung(999L); + } + + @Test + void bezahlt_returnsUpdatedRechnung_whenSuccessful() { + // Arrange + Rechnung updated = new Rechnung(); + updated.setId(7L); + updated.setBezahlt(true); + updated.setBezahltAm(new Date()); + when(werkstattService.setzeBezahlt(7L)).thenReturn(updated); + + // Act + ResponseEntity response = controller.bezahlt(7L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isEqualTo(updated); + verify(werkstattService).setzeBezahlt(7L); + } + + @Test + void bezahlt_returnsInternalServerError_whenExceptionThrown() { + // Arrange + String errorMsg = "Rechnung nicht gefunden"; + when(werkstattService.setzeBezahlt(888L)).thenThrow(new RuntimeException(errorMsg)); + + // Act + ResponseEntity response = controller.bezahlt(888L); + + // Assert + assertThat(response.getStatusCode().is5xxServerError()).isTrue(); + assertThat(response.getBody()).isEqualTo(errorMsg); + verify(werkstattService).setzeBezahlt(888L); + } + + @Test + void erstellen_handlesNullRechnungFromService() { + // Arrange + when(werkstattService.erstelleRechnung(100L)).thenReturn(null); + + // Act + ResponseEntity response = controller.erstellen(100L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).erstelleRechnung(100L); + } + + @Test + void bezahlt_handlesNullRechnungFromService() { + // Arrange + when(werkstattService.setzeBezahlt(200L)).thenReturn(null); + + // Act + ResponseEntity response = controller.bezahlt(200L); + + // Assert + assertThat(response.getStatusCode().is2xxSuccessful()).isTrue(); + assertThat(response.getBody()).isNull(); + verify(werkstattService).setzeBezahlt(200L); + } +} diff --git a/modern/src/test/java/at/werkstatt/crm/gen/RechnungGeneratedTest.java b/modern/src/test/java/at/werkstatt/crm/gen/RechnungGeneratedTest.java new file mode 100644 index 0000000..e0e40f5 --- /dev/null +++ b/modern/src/test/java/at/werkstatt/crm/gen/RechnungGeneratedTest.java @@ -0,0 +1,157 @@ +// ADOPTED FROM THE G6 EXPERIMENT — see docs/adr/0011-adopting-generated-tests.md +// +// Provenance: ai-testgen run 2026-07-31, arm M2 (qwen_qwen3-coder-next), corpus B, unit +// s4-rechnung, +// as generated by the model and then repaired under PROTOCOL.md §6 Phase B. +// Measured at adoption: 7 test methods, mutation score 12/12 = 100%. +// +// The immutable experiment artifact is +// `ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s4-rechnung/`. +// This copy is ordinary repo code from here on: it may be edited, and it must stay green. +// It was NOT written by a human, and no test method was added during repair (amendment A2.2). +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; + +import at.werkstatt.crm.model.Rechnung; +import java.util.Date; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class RechnungGeneratedTest { + + private Rechnung rechnung; + + @BeforeEach + void setUp() { + rechnung = new Rechnung(); + } + + @Test + void defaultConstructorInitializesAllFieldsToNullOrFalse() { + assertThat(rechnung.getId()).isNull(); + assertThat(rechnung.getRechnungNr()).isNull(); + assertThat(rechnung.getAuftragId()).isNull(); + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(0.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(0.0); + assertThat(rechnung.isBezahlt()).isFalse(); + assertThat(rechnung.getBezahltAm()).isNull(); + assertThat(rechnung.getAuftragNr()).isNull(); + assertThat(rechnung.getKundeName()).isNull(); + } + + @Test + void settersAndGettersWorkCorrectly() { + Long id = 1L; + String rechnungNr = "R2024-001"; + Long auftragId = 100L; + Date ausgestelltAm = new Date(); + double summeNetto = 100.50; + double ust = 20.10; + double summeBrutto = 120.60; + boolean bezahlt = true; + Date bezahltAm = new Date(); + String auftragNr = "A2024-50"; + String kundeName = "Max Mustermann"; + + rechnung.setId(id); + rechnung.setRechnungNr(rechnungNr); + rechnung.setAuftragId(auftragId); + rechnung.setAusgestelltAm(ausgestelltAm); + rechnung.setSummeNetto(summeNetto); + rechnung.setUst(ust); + rechnung.setSummeBrutto(summeBrutto); + rechnung.setBezahlt(bezahlt); + rechnung.setBezahltAm(bezahltAm); + rechnung.setAuftragNr(auftragNr); + rechnung.setKundeName(kundeName); + + assertThat(rechnung.getId()).isEqualTo(id); + assertThat(rechnung.getRechnungNr()).isEqualTo(rechnungNr); + assertThat(rechnung.getAuftragId()).isEqualTo(auftragId); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(ausgestelltAm); + assertThat(rechnung.getSummeNetto()).isEqualTo(summeNetto); + assertThat(rechnung.getUst()).isEqualTo(ust); + assertThat(rechnung.getSummeBrutto()).isEqualTo(summeBrutto); + assertThat(rechnung.isBezahlt()).isTrue(); + assertThat(rechnung.getBezahltAm()).isEqualTo(bezahltAm); + assertThat(rechnung.getAuftragNr()).isEqualTo(auftragNr); + assertThat(rechnung.getKundeName()).isEqualTo(kundeName); + } + + @Test + void doubleValuesCanBeSetToZeroAndNegative() { + rechnung.setSummeNetto(0.0); + rechnung.setUst(-5.0); + rechnung.setSummeBrutto(-10.5); + + assertThat(rechnung.getSummeNetto()).isEqualTo(0.0); + assertThat(rechnung.getUst()).isEqualTo(-5.0); + assertThat(rechnung.getSummeBrutto()).isEqualTo(-10.5); + } + + @Test + void booleanBezahltCanBeSetToFalse() { + rechnung.setBezahlt(false); + assertThat(rechnung.isBezahlt()).isFalse(); + } + + @Test + void dateFieldsCanBeSetToNull() { + rechnung.setAusgestelltAm(null); + rechnung.setBezahltAm(null); + + assertThat(rechnung.getAusgestelltAm()).isNull(); + assertThat(rechnung.getBezahltAm()).isNull(); + } + + @Test + void stringFieldsCanBeSetToEmptyString() { + rechnung.setRechnungNr(""); + rechnung.setAuftragNr(""); + rechnung.setKundeName(""); + + assertThat(rechnung.getRechnungNr()).isEqualTo(""); + assertThat(rechnung.getAuftragNr()).isEqualTo(""); + assertThat(rechnung.getKundeName()).isEqualTo(""); + } + + @Test + void allFieldsCanBeSetInSequenceAndRetrievedConsistently() { + rechnung.setId(42L); + assertThat(rechnung.getId()).isEqualTo(42L); + + rechnung.setRechnungNr("R-2024-123"); + assertThat(rechnung.getRechnungNr()).isEqualTo("R-2024-123"); + + rechnung.setAuftragId(999L); + assertThat(rechnung.getAuftragId()).isEqualTo(999L); + + Date now = new Date(); + rechnung.setAusgestelltAm(now); + assertThat(rechnung.getAusgestelltAm()).isEqualTo(now); + + rechnung.setSummeNetto(123.456); + assertThat(rechnung.getSummeNetto()).isEqualTo(123.456); + + rechnung.setUst(24.691); + assertThat(rechnung.getUst()).isEqualTo(24.691); + + rechnung.setSummeBrutto(148.147); + assertThat(rechnung.getSummeBrutto()).isEqualTo(148.147); + + rechnung.setBezahlt(true); + assertThat(rechnung.isBezahlt()).isTrue(); + + rechnung.setBezahltAm(now); + assertThat(rechnung.getBezahltAm()).isEqualTo(now); + + rechnung.setAuftragNr("A-2024-777"); + assertThat(rechnung.getAuftragNr()).isEqualTo("A-2024-777"); + + rechnung.setKundeName("Erika Musterfrau"); + assertThat(rechnung.getKundeName()).isEqualTo("Erika Musterfrau"); + } +} diff --git a/modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java b/modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java new file mode 100644 index 0000000..3bba5de --- /dev/null +++ b/modern/src/test/java/at/werkstatt/crm/gen/WerkstattServiceGeneratedTest.java @@ -0,0 +1,711 @@ +// ADOPTED FROM THE G6 EXPERIMENT — see docs/adr/0011-adopting-generated-tests.md +// +// Provenance: ai-testgen run 2026-07-31, arm M2 (qwen_qwen3-coder-next), corpus B, unit +// s1-werkstattservice, +// as generated by the model and then repaired under PROTOCOL.md §6 Phase B. +// Measured at adoption: 40 test methods, mutation score 49/111 = 44.1%. +// +// The immutable experiment artifact is +// `ai-testgen/runs/2026-07-31/qwen_qwen3-coder-next/B/s1-werkstattservice/`. +// This copy is ordinary repo code from here on: it may be edited, and it must stay green. +// It was NOT written by a human, and no test method was added during repair (amendment A2.2). +package at.werkstatt.crm.gen; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +import at.werkstatt.crm.model.Auftrag; +import at.werkstatt.crm.model.AuftragPosition; +import at.werkstatt.crm.model.Fahrzeug; +import at.werkstatt.crm.model.Kunde; +import at.werkstatt.crm.model.MonatsBericht; +import at.werkstatt.crm.model.Rechnung; +import at.werkstatt.crm.service.WerkstattService; +import java.util.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.jdbc.core.RowMapper; + +class WerkstattServiceGeneratedTest { + + private static final String SQL_AUFTRAG = "FROM auftrag a"; + private static final String SQL_POSITION = "auftrag_position"; + private static final int JAHR = Calendar.getInstance().get(Calendar.YEAR); + + private WerkstattService service; + + @Mock private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + service = new WerkstattService(jdbcTemplate, 20); + } + + // ==================== KUNDEN ==================== + + @Test + void getAlleKunden_returnsAllKunden_fromDatabase() { + List expectedKunden = new ArrayList<>(); + Kunde k1 = new Kunde(); + k1.setId(1L); + expectedKunden.add(k1); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(expectedKunden); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq("muster"))) + .thenReturn(expectedKunden); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(expectedKunden); + when(jdbcTemplate.queryForList(anyString(), eq(2023), eq(2023))) + .thenReturn(Collections.emptyList()); + when(jdbcTemplate.queryForObject(anyString(), any(Class.class))).thenReturn(1); + when(jdbcTemplate.queryForObject(anyString(), any(Class.class), any(Object[].class))) + .thenReturn(1L); + + // Mock row mapper calls for each query + List result = service.getAlleKunden(); + + assertThat(result).isEqualTo(expectedKunden); + verify(jdbcTemplate).query(anyString(), any(RowMapper.class)); + } + + @Test + void sucheKunden_emptyInput_returnsEmptyList() { + List expected = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq("%%"), eq("%%"), eq("%%"))) + .thenReturn(expected); + + List result = service.sucheKunden(""); + + assertThat(result).isEmpty(); + verify(jdbcTemplate).query(anyString(), any(RowMapper.class), eq("%%"), eq("%%"), eq("%%")); + } + + @Test + void sucheKunden_withValidInput_performsSearch() { + List expected = new ArrayList<>(); + Kunde k1 = new Kunde(); + k1.setId(1L); + k1.setNachname("Müller"); + expected.add(k1); + + when(jdbcTemplate.query( + anyString(), any(RowMapper.class), eq("%müller%"), eq("%müller%"), eq("%müller%"))) + .thenReturn(expected); + + List result = service.sucheKunden("Müller"); + + assertThat(result).hasSize(1); + assertThat(result.get(0).getNachname()).isEqualTo("Müller"); + } + + @Test + void getKunde_found_returnsKunde() { + Kunde k1 = new Kunde(); + k1.setId(1L); + List liste = Collections.singletonList(k1); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Kunde result = service.getKunde(1L); + + assertThat(result).isNotNull(); + assertThat(result.getId()).isEqualTo(1L); + } + + @Test + void getKunde_notFound_returnsNull() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Kunde result = service.getKunde(1L); + + assertThat(result).isNull(); + } + + @Test + void speichereKunde_newInsert_returnsSavedKunde() { + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(42L); + Kunde gespeichert = new Kunde(); + gespeichert.setId(42L); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(42L))) + .thenReturn(Collections.singletonList(gespeichert)); + + Kunde k = new Kunde(); + k.setAnrede("Herr"); + k.setVorname("Max"); + k.setNachname("Mustermann"); + k.setTelefon("0664/1234567"); + k.setEmail("max@ Beispiel.com"); + k.setStrasse("Beispielstraße 1"); + k.setPlz("1234"); + k.setOrt(" Beispielstadt"); + k.setNotiz("Testkunde"); + + Kunde saved = service.speichereKunde(k); + + assertThat(saved.getId()).isEqualTo(42L); + assertThat(k.getId()).isEqualTo(42L); + verify(jdbcTemplate).queryForObject(anyString(), eq(Long.class), any(Object[].class)); + } + + @Test + void speichereKunde_update_returnsUpdatedKunde() { + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))) + .thenReturn(Collections.emptyList()); + List liste = new ArrayList<>(); + Kunde k1 = new Kunde(); + k1.setId(1L); + k1.setVorname("Updated"); + liste.add(k1); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Kunde k = new Kunde(); + k.setId(1L); + k.setAnrede("Frau"); + k.setVorname("Updated"); + k.setNachname("Test"); + + Kunde result = service.speichereKunde(k); + + assertThat(result.getVorname()).isEqualTo("Updated"); + verify(jdbcTemplate).update(anyString(), any(Object[].class)); + } + + @Test + void loescheKunde_executesDelete() { + long kundeId = 1L; + + service.loescheKunde(kundeId); + + verify(jdbcTemplate).update(anyString(), eq(kundeId)); + } + + // ==================== FAHRZEUGE ==================== + + @Test + void getAlleFahrzeuge_returnsAllFahrzeuge() { + List fahrzeuge = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class))).thenReturn(fahrzeuge); + + List result = service.getAlleFahrzeuge(); + + assertThat(result).isEqualTo(fahrzeuge); + } + + @Test + void getFahrzeugeZuKunde_returnsFahrzeuge_forGivenKundeId() { + List fahrzeuge = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(fahrzeuge); + + List result = service.getFahrzeugeZuKunde(1L); + + assertThat(result).isEqualTo(fahrzeuge); + } + + @Test + void getFahrzeug_notFound_returnsNull() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Fahrzeug result = service.getFahrzeug(1L); + + assertThat(result).isNull(); + } + + @Test + void speichereFahrzeug_insert_returnsSavedFahrzeug() { + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(42L); + List fahrzeuge = new ArrayList<>(); + Fahrzeug f = new Fahrzeug(); + f.setId(42L); + fahrzeuge.add(f); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(42L))).thenReturn(fahrzeuge); + + Fahrzeug fahrzeug = new Fahrzeug(); + fahrzeug.setKundeId(1L); + fahrzeug.setKennzeichen("ABC-123"); + fahrzeug.setMarke("VW"); + fahrzeug.setModell("Golf"); + + Fahrzeug result = service.speichereFahrzeug(fahrzeug); + + assertThat(result.getId()).isEqualTo(42L); + } + + @Test + void speichereFahrzeug_update_executesUpdate() { + List fahrzeuge = new ArrayList<>(); + Fahrzeug f = new Fahrzeug(); + f.setId(1L); + fahrzeuge.add(f); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(fahrzeuge); + + Fahrzeug fahrzeug = new Fahrzeug(); + fahrzeug.setId(1L); + fahrzeug.setKennzeichen("NEW-123"); + + service.speichereFahrzeug(fahrzeug); + + verify(jdbcTemplate).update(anyString(), any(Object[].class)); + } + + @Test + void loescheFahrzeug_executesDelete() { + service.loescheFahrzeug(1L); + + verify(jdbcTemplate).update(anyString(), eq(1L)); + } + + // ==================== AUFTRAEGE ==================== + + @Test + void getAuftraege_withNullStatus_returnsAll() { + List liste = new ArrayList<>(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), any())).thenReturn(liste); + + List result = service.getAuftraege(null); + + assertThat(result).isEqualTo(liste); + } + + @Test + void getAuftraege_withStatus_filtersByStatus() { + List liste = Collections.singletonList(new Auftrag()); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(Auftrag.STATUS_ANGENOMMEN))) + .thenReturn(liste); + + List result = service.getAuftraege(Auftrag.STATUS_ANGENOMMEN); + + assertThat(result).hasSize(1); + } + + @Test + void getAuftrag_notFound_returnsNull() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + Auftrag result = service.getAuftrag(1L); + + assertThat(result).isNull(); + } + + @Test + void getAuftrag_found_returnsAuftragWithPositionen() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + List liste = Collections.singletonList(auftrag); + List positionen = new ArrayList<>(); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))) + .thenReturn(positionen); + + Auftrag result = service.getAuftrag(1L); + + assertThat(result).isNotNull(); + assertThat(result.getPositionen()).isEqualTo(positionen); + } + + @Test + void setPositionen_inGetterCalls_OneSetPositionen() { + Auftrag a = new Auftrag(); + a.setId(1L); + List liste = Collections.singletonList(a); + List pos = new ArrayList<>(); + pos.add(new AuftragPosition()); + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + + Auftrag result = service.getAuftrag(1L); + assertThat(result.getPositionen()).hasSize(1); + } + + @Test + void neuerAuftrag_returnsNewAuftragWithGeneratedNumber() { + Integer max = 5; + List liste = new ArrayList<>(); + Auftrag a = new Auftrag(); + a.setId(10L); + a.setAuftragNr("A-" + JAHR + "-0006"); + a.setStatus(Auftrag.STATUS_ANGENOMMEN); + liste.add(a); + + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq("A-" + JAHR + "-%"))) + .thenReturn(max); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(10L); + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(10L))) + .thenReturn(liste); + + Auftrag input = new Auftrag(); + input.setFahrzeugId(100L); + input.setKundeId(1L); + input.setStatus("ANGENOMMEN"); + input.setBeschreibung("Test"); + + Auftrag result = service.neuerAuftrag(input); + + assertThat(result.getAuftragNr()).isEqualTo("A-" + JAHR + "-0006"); + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_ANGENOMMEN); + assertThat(result.getId()).isEqualTo(10L); + } + + @Test + void setzeStatus_invalidTransition_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_ABGEHOLT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.setzeStatus(1L, Auftrag.STATUS_ANGENOMMEN)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Statuswechsel ABGEHOLT -> ANGENOMMEN ist nicht erlaubt"); + } + + @Test + void setzeStatus_validTransition_statusUpdated() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN); + List liste = Collections.singletonList(auftrag); + Auftrag nachher = new Auftrag(); + nachher.setId(1L); + nachher.setAuftragNr("A-2025-0001"); + nachher.setStatus(Auftrag.STATUS_IN_ARBEIT); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))) + .thenReturn(liste, Collections.singletonList(nachher)); + + Auftrag result = service.setzeStatus(1L, Auftrag.STATUS_IN_ARBEIT); + + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_IN_ARBEIT); + verify(jdbcTemplate).update(anyString(), eq(Auftrag.STATUS_IN_ARBEIT), eq(1L)); + } + + @Test + void setzeStatus_fertig_updatesFertigAm() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_IN_ARBEIT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + service.setzeStatus(1L, Auftrag.STATUS_FERTIG); + + verify(jdbcTemplate).update(contains("fertig_am = now()"), eq(Auftrag.STATUS_FERTIG), eq(1L)); + } + + @Test + void setzeStatus_nonExistingAuftrag_throwsRuntimeException() { + List liste = Collections.emptyList(); + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.setzeStatus(1L, Auftrag.STATUS_IN_ARBEIT)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag 1 nicht gefunden"); + } + + @Test + void neuePosition_auftragNotFound_throwsRuntimeException() { + Long auftragId = 1L; + List liste = Collections.emptyList(); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(auftragId))).thenReturn(liste); + + assertThatThrownBy(() -> service.neuePosition(auftragId, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag 1 nicht gefunden"); + } + + @Test + void neuePosition_auftragAbgeschlossen_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_ABGEHOLT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.neuePosition(1L, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag null ist abgeschlossen, keine Positionen mehr moeglich"); + } + + @Test + void neuePosition_success_returnsPosition() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_ANGENOMMEN); + List liste = Collections.singletonList(auftrag); + AuftragPosition p = new AuftragPosition(); + p.setTyp(AuftragPosition.TYP_ARBEIT); + p.setBezeichnung("Reparatur"); + p.setMenge(1.5); + p.setEinzelpreis(80.0); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(7L); + + AuftragPosition result = service.neuePosition(1L, p); + + assertThat(result.getId()).isEqualTo(7L); + assertThat(result.getAuftragId()).isEqualTo(1L); + verify(jdbcTemplate).queryForObject(anyString(), eq(Long.class), any(Object[].class)); + } + + @Test + void loeschePosition_executesDelete() { + service.loeschePosition(9L); + + verify(jdbcTemplate).update(anyString(), eq(9L)); + } + + // ==================== RECHNUNGEN ==================== + + @Test + void erstelleRechnung_auftragNichtGefunden_throwsRuntimeException() { + Long auftragId = 1L; + List liste = Collections.emptyList(); + + when(jdbcTemplate.query(anyString(), any(RowMapper.class), eq(auftragId))).thenReturn(liste); + + assertThatThrownBy(() -> service.erstelleRechnung(auftragId)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag 1 nicht gefunden"); + } + + @Test + void erstelleRechnung_auftragNichtFertig_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_IN_ARBEIT); + List liste = Collections.singletonList(auftrag); + List pos = new ArrayList<>(); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + + assertThatThrownBy(() -> service.erstelleRechnung(1L)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Rechnung geht nur bei Status FERTIG, Auftrag A-2025-0001 ist IN_ARBEIT"); + } + + @Test + void erstelleRechnung_rechnungBereitsVorhanden_throwsRuntimeException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_FERTIG); + List liste = Collections.singletonList(auftrag); + List pos = new ArrayList<>(); + AuftragPosition p = new AuftragPosition(); + p.setMenge(2.0); + p.setEinzelpreis(50.0); + pos.add(p); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + when(jdbcTemplate.queryForObject(contains("FROM rechnung"), eq(Integer.class), eq(1L))) + .thenReturn(1); + + assertThatThrownBy(() -> service.erstelleRechnung(1L)) + .isInstanceOf(RuntimeException.class) + .hasMessage("Zum Auftrag null gibt es schon eine Rechnung"); + } + + @Test + void erstelleRechnung_success_createsRechnungWithCorrectValues() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_FERTIG); + List liste = Collections.singletonList(auftrag); + + List pos = new ArrayList<>(); + AuftragPosition p = new AuftragPosition(); + p.setMenge(2.0); + p.setEinzelpreis(50.0); // 2*50 = 100 netto + pos.add(p); + auftrag.setPositionen(pos); + + Integer bestanden = 0; + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + when(jdbcTemplate.query(contains(SQL_POSITION), any(RowMapper.class), eq(1L))).thenReturn(pos); + when(jdbcTemplate.queryForObject(contains("COUNT(*) FROM rechnung"), eq(Integer.class), eq(1L))) + .thenReturn(bestanden); + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq("R-" + JAHR + "-%"))) + .thenReturn(0); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(101L); + + List rechnungList = new ArrayList<>(); + Rechnung r = new Rechnung(); + r.setId(101L); + r.setRechnungNr("R-" + JAHR + "-0001"); + r.setSummeNetto(100.0); + r.setUst(20.0); + r.setSummeBrutto(120.0); + rechnungList.add(r); + + when(jdbcTemplate.query(contains("FROM rechnung r"), any(RowMapper.class), eq(101L))) + .thenReturn(rechnungList); + + Rechnung result = service.erstelleRechnung(1L); + + assertThat(result.getRechnungNr()).isEqualTo("R-" + JAHR + "-0001"); + assertThat(result.getSummeNetto()).isEqualTo(100.0); + assertThat(result.getUst()).isEqualTo(20.0); + assertThat(result.getSummeBrutto()).isEqualTo(120.0); + } + + @Test + void setzeBezahlt_updatesRechnung_toBezahlt() { + service.setzeBezahlt(99L); + + verify(jdbcTemplate).update(anyString(), eq(99L)); + } + + // ==================== BERICHT ==================== + + @Test + void getMonatsBericht_returns12Months() { + List berichte = new ArrayList<>(); + for (int m = 1; m <= 12; m++) { + MonatsBericht b = new MonatsBericht(); + b.setMonat(m); + berichte.add(b); + } + + when(jdbcTemplate.query( + anyString(), any(RowMapper.class), eq(2023), eq(2023), eq(2023), eq(2023))) + .thenReturn(berichte); + + List result = service.getMonatsBericht(2023); + + assertThat(result).hasSize(12); + for (int i = 0; i < 12; i++) { + assertThat(result.get(i).getMonat()).isEqualTo(i + 1); + } + } + + @Test + void getTopKunden_executesQuery_withTwoParams() { + List> reported = new ArrayList<>(); + Map row = new HashMap<>(); + row.put("id", 1L); + reported.add(row); + when(jdbcTemplate.queryForList(anyString(), eq(2024), eq(2024))).thenReturn(reported); + + List> result = service.getTopKunden(2024); + + assertThat(result).isNotNull(); + verify(jdbcTemplate).queryForList(anyString(), eq(2024), eq(2024)); + } + + // ==================== ADMIN / STATISTIK ==================== + + @Test + void getAdminStatistik_returnsAllFields() { + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))) + .thenReturn(42, 7, 15, 5, 3, 1); + + Map stat = service.getAdminStatistik(); + + assertThat(stat).containsEntry("kunden", 42); + assertThat(stat).containsEntry("fahrzeuge", 7); + assertThat(stat).containsEntry("auftraege", 15); + assertThat(stat).containsEntry("auftraegeOffen", 5); + assertThat(stat).containsEntry("rechnungen", 3); + assertThat(stat).containsEntry("rechnungenOffen", 1); + assertThat(stat).containsKey("stand"); + } + + // ==================== BEHINDERTEN ABRECHNUNG / BEREINIGUNG ==================== + + @Test + void bereinigeStornierte_deletesOldStornierte() { + List ids = Arrays.asList(10L, 20L); + + when(jdbcTemplate.queryForList(anyString(), eq(Long.class))).thenReturn(ids); + + int result = service.bereinigeStornierte(); + + assertThat(result).isEqualTo(2); + verify(jdbcTemplate, times(2)).update(anyString(), eq(10L)); + verify(jdbcTemplate, times(2)).update(anyString(), eq(20L)); + } + + // ==================== RANDFAELLLET ==================== + + @Test + void neuerAuftrag_withKmStand_updatesFahrzeugKmStand() { + Integer max = 5; + List liste = new ArrayList<>(); + Auftrag a = new Auftrag(); + a.setId(10L); + a.setFahrzeugId(33L); + a.setKmStand(125000); + a.setAuftragNr("A-" + JAHR + "-0006"); + liste.add(a); + + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq("A-" + JAHR + "-%"))) + .thenReturn(max); + when(jdbcTemplate.queryForObject(anyString(), eq(Long.class), any(Object[].class))) + .thenReturn(10L); + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(10L))) + .thenReturn(liste); + + Auftrag input = new Auftrag(); + input.setFahrzeugId(33L); + input.setKundeId(1L); + input.setKmStand(125000); + + service.neuerAuftrag(input); + + verify(jdbcTemplate).update(anyString(), eq(125000), eq(33L)); + } + + @Test + void neuePosition_afterAbgeholt_throwsException() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setAuftragNr("A-2025-0001"); + auftrag.setStatus(Auftrag.STATUS_ABGEHOLT); + List liste = Collections.singletonList(auftrag); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))).thenReturn(liste); + + assertThatThrownBy(() -> service.neuePosition(1L, new AuftragPosition())) + .isInstanceOf(RuntimeException.class) + .hasMessage("Auftrag A-2025-0001 ist abgeschlossen, keine Positionen mehr moeglich"); + } + + @Test + void setzeStatus_backToArbeitFromFertig_allowed() { + Auftrag auftrag = new Auftrag(); + auftrag.setId(1L); + auftrag.setStatus(Auftrag.STATUS_FERTIG); + List liste = Collections.singletonList(auftrag); + Auftrag nachher = new Auftrag(); + nachher.setId(1L); + nachher.setStatus(Auftrag.STATUS_IN_ARBEIT); + + when(jdbcTemplate.query(contains(SQL_AUFTRAG), any(RowMapper.class), eq(1L))) + .thenReturn(liste, Collections.singletonList(nachher)); + + Auftrag result = service.setzeStatus(1L, Auftrag.STATUS_IN_ARBEIT); + + assertThat(result.getStatus()).isEqualTo(Auftrag.STATUS_IN_ARBEIT); + } +} diff --git a/playbook/06-ki-testgenerierung-gemessen.md b/playbook/06-ki-testgenerierung-gemessen.md index 854c144..ca11d12 100644 --- a/playbook/06-ki-testgenerierung-gemessen.md +++ b/playbook/06-ki-testgenerierung-gemessen.md @@ -2,12 +2,15 @@ *Meilenstein: G6 · Protokoll eingefroren: `ai-testgen-protocol-v1` (2026-07-31)* -> **Status dieses Kapitels:** Der Methodenteil unten ist **vor** der ersten -> Modell-Anfrage geschrieben — das ist der ganze Punkt. Die Ergebnisse aus Phase A -> (wie generiert) stehen seit 2026-07-31 weiter unten; der Nachbesserungsaufwand -> (Phase B) folgt. Vollständige Zahlen: `ai-testgen/REPORT.md`. Sollte das Ergebnis -> unbequem ausfallen, steht es trotzdem hier: Ein Protokoll, das man nach dem -> Ergebnis ändert, ist Werbung. +> **Status dieses Kapitels: abgeschlossen (2026-08-02).** Der Methodenteil unten ist +> **vor** der ersten Modell-Anfrage geschrieben — das ist der ganze Punkt. Phase A +> (wie generiert) wurde am 2026-07-31 gemessen, Phase B (Nachbesserung) am 2026-08-02. +> Vollständige Zahlen: `ai-testgen/REPORT.md`. +> +> Das Ergebnis ist unbequem ausgefallen, und es steht trotzdem hier: Die Qualitätszahlen +> sind nach der Reparatur **schlechter** als davor, und in einer von 24 Zellen hat nicht +> das Modell versagt, sondern unsere eigene Auswertung. Beides unten, an der Zahl, nicht +> im Kleingedruckten. Ein Protokoll, das man nach dem Ergebnis ändert, ist Werbung. ## Ausgangslage: die teuerste Frage im Migrationsgespräch @@ -114,7 +117,15 @@ moderne Modul überhaupt eine Testschicht bekommt: |---|---| | ArchUnit-Regeln | Fünf Regeln, migrationszweckgebunden: keine Feldinjektion mehr (sichert den Konstruktor-Sweep aus Etappe 4 dauerhaft), injizierte Felder final, Service kennt keine Controller, SQL bleibt im Service, Modelle bleiben Spring-frei. | | Testcontainers-Integrationstest | Startet PostgreSQL 9.6 aus **denselben** Init-Skripten wie der Compose-Stand und fährt die echten SQL-Pfade — ohne laufenden Stand, ohne zweite Schema-Kopie. | -| Coverage-Gate | Als **Ratsche** scharf gestellt: gepinnt auf das, was die erste Suite tatsächlich erreicht (37,3 % Line, gemessen 2026-07-31), damit Coverage nicht fallen kann. Die 80 % des Standards kommen mit den übernommenen Tests aus dem Experiment — eine Zahl, die nie gemessen wurde, ist Dekoration. | +| Coverage-Gate | Als **Ratsche** scharf gestellt: gepinnt auf das, was die Suite tatsächlich erreicht, dann hochgezogen. 2026-07-31: 37,3 % gemessen → Gate 35 %. 2026-08-02: sechs reparierte Testklassen aus dem Experiment übernommen (88 Methoden, ADR-0011) → **81,3 % gemessen → Gate 80 %**. Damit sind die 80 % des Standards zum ersten Mal *erreicht* statt behauptet. | + +**Nachtrag zur Übernahme, weil die Auswahlregel die eigentliche Lehre ist:** Übernommen wurde +**eine Klasse pro Prüfobjekt**, nach höchstem Mutation-Score, bei Gleichstand die **mit weniger +Testmethoden**. Genau diese dritte Regel hat die 134-Methoden-Klasse aussortiert, die exakt +dasselbe misst wie ihre 13-Methoden-Konkurrentin. Und sie hat gemischt gewählt — zwei Klassen +vom teuren, vier vom günstigen Modell —, was der beste Hinweis darauf ist, dass hier keine +Vorliebe am Werk war. Was die neue 81 %-Zahl **nicht** heißt: Die Gottklasse ist damit nicht +abgesichert; ihre übernommene Suite hat 44 % Mutation-Score. Das steht im ADR neben der Zahl. Merksatz für Ihr Projekt: **Ein Gate, das Sie nicht erreichen können, schalten Sie nicht „später" scharf — Sie schalten es als Ratsche scharf und ziehen sie @@ -148,11 +159,73 @@ Zwei weitere Punkte für die Kalkulation: - **Billig ist nicht „fast so gut“.** Das offene Modell war 18-mal günstiger und kompilierte in 3 von 12 statt 9 von 12 Fällen. -**Was diese Zahlen noch NICHT beantworten:** Was kostet der Weg von „generiert“ zu -„brauchbar“? Die Hälfte der Zellen ist reparaturbedürftig — die Fehler sind ausnahmslos -billige Sorten (fehlende Imports, ein verstümmelter Import, abgeschnittene Ausgabe), -aber „billig aussehend“ ist keine Messung. Erst Phase B liefert die Zahl, und ohne sie -ist jede Wirtschaftlichkeitsaussage unvollständig. Deshalb steht hier keine. +## Ergebnisse Phase B (nach Nachbesserung), 2026-08-02 + +Elf Zellen mussten repariert werden. Regel dabei: **reparieren ja, dazuschreiben nein** — kein +Testfall, den das Modell nicht selbst geschrieben hat. Nachgeprüft, nicht geglaubt. + +| Kennzahl | Phase A (wie generiert) | Phase B (repariert) | +|---|---|---| +| Grüne Zellen | 12 von 24 | **21 von 24** | +| Testmethoden | 154 (3 rot) | **421 (0 rot)** | +| Line-Coverage | 100 % | **90,5 %** | +| Branch-Coverage | 100 % | **78,8 %** | +| Mutation-Score | 99,2 % | **73,2 %** | + +**Die Zahlen werden nach der Reparatur schlechter — und das ist das wertvollste Ergebnis +dieses Meilensteins.** + +Nicht weil die Reparatur geschadet hätte. Sondern weil die makellosen Phase-A-Werte nur über +die Zellen gerechnet waren, die *zufällig kompiliert hatten* — und das waren ausnahmslos die +kleinen Controller. Die Gottklasse war im Nenner gar nicht enthalten. Erst die Reparatur holt +sie hinein. + +> **Merksatz für jedes KI-Werbeversprechen, das Sie künftig lesen:** +> Fragen Sie nicht „Wie gut waren die generierten Tests?“, sondern +> **„Über wie viele der Versuche ist diese Zahl gerechnet?“** +> Eine Erfolgsquote, die nur über die geglückten Läufe gemessen wird, ist keine Messung. +> Das nennt sich Überlebenden-Effekt, und wir sind selbst hineingelaufen — sichtbar nur, +> weil das Protokoll uns zwang, auch die kaputten Zellen zu Ende zu messen. + +**Was ein Entscheider daraus mitnimmt:** + +1. **Die Gottklasse bleibt die Mauer — auch repariert.** Sie ist die einzige Klasse, die der + Prüfung nicht standhält: rund **83 % der Zeilen abgedeckt, aber nur ~50 % der eingebauten + Fehler gefunden**. Ein Coverage-Gate bei 80 % hätte hier „bestanden“ gemeldet. *Genau + deshalb messen wir mit Mutation-Score.* +2. **Zehnmal so viele Tests, exakt null Mehrwert.** Für denselben Controller schrieb ein + Modell 13 Testmethoden, das andere 134 — bei identischem Messergebnis (21/21 Zeilen, + 13/13 Mutanten). Die 121 zusätzlichen Methoden finden nichts und müssen für immer gepflegt + werden. **Kaufen Sie keine Testmengen.** +3. **Kein einziger echter Programmfehler.** 15 Reparaturen betrafen falsche Erwartungen der + Tests, **keine davon** einen Defekt im Produktivcode. Generierte Tests **zementieren** das + vorhandene Verhalten, sie prüfen es nicht. Ohne Charakterisierungsnetz darunter wissen Sie + nicht, ob sie etwas Richtiges festhalten. +4. **Billig kauft Tokens, nicht Ergebnisse.** Das offene Modell war 18-mal günstiger und kam + nach der Reparatur auf 12 von 12 grünen Zellen — verursachte aber **10 der 11 + Reparaturen**. Die Rechnung verschiebt sich vom Einkauf in die Arbeitszeit. +5. **Frisch migriert heißt kurzfristig schlechter unterstützt.** Das offene Modell benutzte + `getStatusCodeValue()` — in Spring 4.3 vorhanden, in Spring 7 **entfernt**. Wer auf einen + sehr neuen Stack migriert, bekommt vorübergehend schlechtere KI-Hilfe, weil das Modellwissen + dem Framework hinterherhinkt. Planbar, aber real. + +**Zur Aufwandszahl sagen wir bewusst weniger, als wir könnten.** Die gemessenen 154 Minuten +über elf Zellen sind als Zeitangabe **unbrauchbar**: Wir haben die Zellen parallel repariert, +und sie haben sich gegenseitig die Maschine weggenommen — eine Zelle meldet 24,7 Minuten +Wanduhr für einen Rechenlauf von 5,6 Sekunden. Wir berichten sie als Obergrenze und benennen +den Fehler als unseren (Protokoll-Nachtrag A4). Belastbar ist stattdessen die **Art und Zahl +der Eingriffe**: 52 insgesamt — 19 Import/Syntax, 17 Mock-Aufbau, 15 falsche Erwartung. +*Der Aufwand hängt nicht an der Zeilenzahl, sondern daran, wie schwer die Abhängigkeiten zu +mocken sind.* + +**Und ein Fund, der uns selbst betrifft.** In einer der 24 Zellen hat nicht das Modell versagt, +sondern **unsere Auswertung**: Das Modell schrieb einen Entwurf, verwarf ihn im Klartext +(„Wait, I need to produce the correct final answer…“) und lieferte danach eine korrekte +Testklasse. Unsere vorab festgelegte Regel „nimm den ersten Codeblock“ hat den verworfenen +Entwurf gewertet. Wir haben die Zahl **nicht** nachträglich korrigiert — eine Regel wird nicht +dadurch falsch, dass sie einen Punkt kostet —, aber wir sagen es an der Zahl. *Für Ihre eigenen +KI-Auswertungen: Wie Sie die Antwort aus dem Modelltext herausschneiden, ist eine +Messentscheidung. Bei uns hing ein Zwölftel des Ergebnisses daran.* **Eine Ehrlichkeitsnotiz zum Ausgabebudget:** Die 16 000-Token-Grenze pro Antwort haben *wir* im Protokoll festgelegt, nicht das Modell. Dass ein Reasoning-Modell sie mit @@ -163,7 +236,7 @@ werden bezahlt, ob sie zu einer Antwort führen oder nicht.** Über die Hälfte Ausgabe-Tokens des teuren Modells entfiel auf die zwei Aufrufe, die nie eine Antwort lieferten. -## Entscheidungsregeln (Stand: Phase A gemessen, Phase B offen) +## Entscheidungsregeln (Stand: beide Phasen gemessen) 1. **Kein KI-Test ohne Netz darunter.** Generierte Tests zementieren das Verhalten, das sie vorfinden — inklusive Fehler. Ohne Charakterisierungs- @@ -179,14 +252,24 @@ lieferten. berichten das wie gemessen, nicht wie erwartet. 4. **Rechnen Sie mit Reparatur.** Die interessante Zahl ist nicht „schreibt die KI Tests?", sondern „wie viel kostet der Weg von generiert zu brauchbar, und - in welchen Kategorien?". + in welchen Kategorien?". Gemessen: 52 Eingriffe über elf Zellen, Schwerpunkt + Import/Syntax und Mock-Aufbau — der Aufwand hängt an der **Mockbarkeit der + Abhängigkeiten**, nicht an der Zeilenzahl. +5. **Fragen Sie nach dem Nenner.** Jede KI-Erfolgsquote, die nur über die geglückten + Läufe gerechnet ist, ist wertlos. Unsere eigenen Phase-A-Zahlen waren genau das, + und erst die vollständige Messung hat es gezeigt. +6. **Kaufen Sie keine Testmengen.** 134 Testmethoden fanden hier exakt so viele Fehler + wie 13 — und kosten dauerhaft das Zehnfache an Pflege. ## Aufwand | Position | Wert | Art | |---|---|---| | Vorbereitung G6 (Protokoll-Finalisierung, zwei Testbed-Module, Harness, Dry-Run, ArchUnit + Testcontainers, Doku) | siehe `docs/worklog.md`, Session 11 | **Messwert** (Agenten-Wall-Time unter Aufsicht) | -| Durchführung + Report | folgt | — | +| Generierung + Phase-A-Messung | siehe `docs/worklog.md`, Session 12 | **Messwert** | +| Phase-B-Reparatur, Messung, Report, Übernahme | siehe `docs/worklog.md`, Session 13 | **Messwert** | +| API-Kosten des gesamten Versuchs | **€ 0,65** | **Messwert** (24 Aufrufe, Preistabelle vorab gepinnt) | +| Reparaturaufwand je Zelle | **nicht belastbar** — siehe oben und Protokoll-Nachtrag A4 | verworfen | *Die Etikettierung folgt der Regel aus `playbook/README.md`: Messwerte sind Agenten-Wall-Time unter Aufsicht, Feldwerte sind gekennzeichnete