# xbyxr9/ise-exam-drills architecture

> Architecture diagram of the GitHub repository xbyxr9/ise-exam-drills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xbyxr9/ise-exam-drills
- Repository: https://github.com/xbyxr9/ise-exam-drills

## Overview

#### Purpose and Build Model
This is a Java 17 Gradle training repository for exam-style JUnit, EasyMock, and Spring REST exercises. It is not one application: it combines isolated domain scenarios, three independently runnable REST servers, and a mutation drill that verifies tests fail against broken implementations. Build orchestration and custom server/report tasks reside in `build.gradle`; the Gradle wrapper is `gradlew`.

#### Entry Points and Execution
The main runnable REST applications are:
- Product server, port 8080: `src/main/java/ise/rest/server/ServerApplication.java`
- Pullover exam server, port 8081: `src/main/java/ise/rest/exam_pullover/PulloverServerApplication.java`
- Practice server, port 8082: `src/main/java/ise/rest/practice/PracticeServerApplication.java`

Use Gradle tasks rather than a single universal main class. The legacy `src/Main.java` is explicitly not part of the maintained Gradle structure.

#### Testing Curriculum Domains
The repository’s dominant structure is independent, progressively numbered scenarios rather than a shared business system:
- JUnit/domain-testing exercises: `src/main/java/ise/testing/`, exemplified by `src/main/java/ise/testing/s12_voidstate/ClubRegistry.java` and `src/main/java/ise/testing/exam_library/Library.java`.
- EasyMock interaction-testing exercises: `src/main/java/ise/mocking/`, including `src/main/java/ise/mocking/s12_callorder/AirlockController.java` and `src/main/java/ise/mocking/exam_vehicle/VehicleManagementSystem.java`.
- Each scenario defines a small SUT with explicit collaborator seams, allowing tests to verify state, exceptions, returned values, call counts, ordering, and forbidden calls.

#### REST Service Architecture
Each REST variant follows a conventional controller/resource → service → repository boundary:
- Product API: `src/main/java/ise/rest/server/ProductResource.java`, `src/main/java/ise/rest/server/ProductService.java`, `src/main/java/ise/rest/server/ProductRepository.java`.
- Pullover stock API: `src/main/java/ise/rest/exam_pullover/PulloverStockResource.java`, `src/main/java/ise/rest/exam_pullover/PulloverStockService.java`, `src/main/java/ise/rest/exam_pullover/PulloverStockRepository.java`.
- Practice stock API mirrors that shape in `src/main/java/ise/rest/practice/PracticeStockResource.java`.

HTTP requests enter Spring MVC resources, are delegated to service logic, then query/update repository abstractions. Shared REST value types, including products, reviews, and sorting inputs, are under `src/main/java/ise/rest/model/`.

#### Client and External Boundaries
The REST client boundary is represented by `src/main/java/ise/rest/client/ProductController.java`, with endpoint/client behavior tested separately. Mocking scenarios model external services as interfaces/collaborators—such as gateways, mail, shipping, storage, and hardware—rather than integrating real providers; e.g., `src/main/java/ise/mocking/s08_exceptions/CardProcessor.java` and `src/main/java/ise/mocking/s13_multiplemocks/CourierApi.java`.

#### Mutation Verification Control Flow
The mutation drill is a meta-test layer: deliberately broken implementations under `src/test/java/ise/mutants/` are executed programmatically by `src/test/java/ise/drill/MutationDrillTest.java`. Normal tests exclude the `mutant` tag, while the drill requires every mutant test to fail. Thus the green suite validates both application behavior and the ability of its tests to detect regressions.

#### Runtime and Infrastructure
Compilation targets Java 17 through Gradle 8.14.5. Spring Boot 3.2.5 libraries provide MVC, WebFlux, testing, and the three embedded HTTP servers, without applying the Spring Boot Gradle plugin. JUnit Jupiter 5.10.2 powers tests; EasyMock 5.2.0 is the intended mocking framework; the JUnit Platform Launcher supports mutation-drill execution.

Main entry points: [`build.gradle`](https://github.com/xbyxr9/ise-exam-drills/blob/master/build.gradle) (Gradle build & tasks), [`src/main/java/ise/rest/server/ProductResource.java`](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductResource.java) (Product resource), [`src/main/java/ise/mocking/s12_callorder/AirlockController.java`](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/s12_callorder/AirlockController.java) (Airlock controller), [`src/main/java/ise/mocking/exam_vehicle/VehicleManagementSystem.java`](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/exam_vehicle/VehicleManagementSystem.java) (Vehicle management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["Build &amp; Runtime"]
  node_gradle{{"Gradle build &amp; tasks<br/>[build.gradle]"}}
  node_wrapper["Gradle wrapper<br/>launcher"]
end

subgraph group_curriculum["Testing Curriculum"]
  node_junit_domains["JUnit domain scenarios<br/>exercise suite"]
  node_club_registry["Club registry scenario<br/>domain SUT<br/>[ClubRegistry.java]"]
  node_library["Library exam scenario<br/>domain SUT<br/>[Library.java]"]
  node_mocking_domains["EasyMock scenarios<br/>exercise suite"]
  node_airlock["Airlock controller<br/>interaction SUT"]
  node_vehicle["Vehicle management<br/>interaction SUT"]
  node_external_collaborators["External collaborators<br/>mock interfaces<br/>[CardProcessor.java]"]
end

subgraph group_product["Product REST · 8080"]
  node_product_app{{"Product server<br/>Spring Boot app"}}
  node_product_resource["Product resource<br/>MVC controller"]
  node_product_service["Product service"]
  node_product_repository[("Product repository")]
  node_rest_models["Shared REST models<br/>value types"]
  node_product_client["Product client controller<br/>REST client"]
end

subgraph group_pullover["Pullover REST · 8081"]
  node_pullover_app{{"Pullover server<br/>Spring Boot app"}}
  node_pullover_resource["Pullover stock resource<br/>MVC controller"]
  node_pullover_service["Pullover stock service"]
  node_pullover_repository[("Pullover stock repository")]
end

subgraph group_practice["Practice REST · 8082"]
  node_practice_app{{"Practice server<br/>Spring Boot app"}}
  node_practice_resource["Practice stock resource<br/>MVC controller"]
end

subgraph group_quality["Mutation Verification"]
  node_mutation_drill{{"Mutation drill<br/>meta-test"}}
  node_mutants["Broken implementations<br/>mutant tests"]
end

node_wrapper -->|"invokes"| node_gradle
node_gradle -->|"runs task"| node_product_app
node_gradle -->|"runs task"| node_pullover_app
node_gradle -->|"runs task"| node_practice_app
node_junit_domains -->|"contains"| node_club_registry
node_junit_domains -->|"contains"| node_library
node_mocking_domains -->|"contains"| node_airlock
node_mocking_domains -->|"contains"| node_vehicle
node_airlock -.->|"mocked calls"| node_external_collaborators
node_vehicle -.->|"mocked calls"| node_external_collaborators
node_product_app -->|"serves HTTP"| node_product_resource
node_product_resource -->|"delegates"| node_product_service
node_product_service -->|"queries/updates"| node_product_repository
node_product_resource -->|"uses"| node_rest_models
node_product_client -.->|"calls endpoints"| node_product_resource
node_pullover_app -->|"serves HTTP"| node_pullover_resource
node_pullover_resource -->|"delegates"| node_pullover_service
node_pullover_service -->|"queries/updates"| node_pullover_repository
node_practice_app -->|"serves HTTP"| node_practice_resource
node_mutation_drill -->|"executes"| node_mutants
node_gradle -->|"runs tests"| node_mutation_drill

click node_gradle "https://github.com/xbyxr9/ise-exam-drills/blob/master/build.gradle"
click node_wrapper "https://github.com/xbyxr9/ise-exam-drills/blob/master/gradlew"
click node_club_registry "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/testing/s12_voidstate/ClubRegistry.java"
click node_library "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/testing/exam_library/Library.java"
click node_airlock "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/s12_callorder/AirlockController.java"
click node_vehicle "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/exam_vehicle/VehicleManagementSystem.java"
click node_external_collaborators "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/s08_exceptions/CardProcessor.java"
click node_product_app "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ServerApplication.java"
click node_product_resource "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductResource.java"
click node_product_service "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductService.java"
click node_product_repository "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductRepository.java"
click node_pullover_app "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverServerApplication.java"
click node_pullover_resource "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverStockResource.java"
click node_pullover_service "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverStockService.java"
click node_pullover_repository "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverStockRepository.java"
click node_practice_app "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/practice/PracticeServerApplication.java"
click node_practice_resource "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/practice/PracticeStockResource.java"
click node_product_client "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/client/ProductController.java"
click node_mutation_drill "https://github.com/xbyxr9/ise-exam-drills/blob/master/src/test/java/ise/drill/MutationDrillTest.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gradle,node_wrapper toneBlue
class node_junit_domains,node_club_registry,node_library,node_mocking_domains,node_airlock,node_vehicle,node_external_collaborators toneAmber
class node_product_app,node_product_resource,node_product_service,node_product_repository,node_rest_models,node_product_client toneMint
class node_pullover_app,node_pullover_resource,node_pullover_service,node_pullover_repository toneRose
class node_practice_app,node_practice_resource toneIndigo
class node_mutation_drill,node_mutants toneTeal
```

## Components

### Build & Runtime

- [Gradle build & tasks](https://github.com/xbyxr9/ise-exam-drills/blob/master/build.gradle): Gradle · Build orchestration and custom server/report tasks. · `build.gradle`
- [Gradle wrapper](https://github.com/xbyxr9/ise-exam-drills/blob/master/gradlew): launcher · `gradlew`

### Testing Curriculum

- **JUnit domain scenarios**: exercise suite · Independent state, exception, and return-value testing scenarios.
- [Club registry scenario](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/testing/s12_voidstate/ClubRegistry.java): domain SUT · `src/main/java/ise/testing/s12_voidstate/ClubRegistry.java`
- [Library exam scenario](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/testing/exam_library/Library.java): domain SUT · `src/main/java/ise/testing/exam_library/Library.java`
- **EasyMock scenarios**: exercise suite · SUTs use collaborator seams for interaction assertions.
- [Airlock controller](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/s12_callorder/AirlockController.java): interaction SUT · `src/main/java/ise/mocking/s12_callorder/AirlockController.java`
- [Vehicle management](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/exam_vehicle/VehicleManagementSystem.java): interaction SUT · `src/main/java/ise/mocking/exam_vehicle/VehicleManagementSystem.java`
- [External collaborators](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/mocking/s08_exceptions/CardProcessor.java): mock interfaces · Gateways, mail, shipping, storage, and hardware are mocked. · `src/main/java/ise/mocking/s08_exceptions/CardProcessor.java`

### Product REST · 8080

- [Product server](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ServerApplication.java): Spring Boot app · Embedded server on port 8080. · `src/main/java/ise/rest/server/ServerApplication.java`
- [Product resource](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductResource.java): MVC controller · `src/main/java/ise/rest/server/ProductResource.java`
- [Product service](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductService.java): service · `src/main/java/ise/rest/server/ProductService.java`
- [Product repository](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/server/ProductRepository.java): repository · `src/main/java/ise/rest/server/ProductRepository.java`
- **Shared REST models**: value types · Products, reviews, and sorting inputs.
- [Product client controller](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/client/ProductController.java): REST client · Separately tested endpoint/client boundary. · `src/main/java/ise/rest/client/ProductController.java`

### Pullover REST · 8081

- [Pullover server](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverServerApplication.java): Spring Boot app · Embedded server on port 8081. · `src/main/java/ise/rest/exam_pullover/PulloverServerApplication.java`
- [Pullover stock resource](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverStockResource.java): MVC controller · `src/main/java/ise/rest/exam_pullover/PulloverStockResource.java`
- [Pullover stock service](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverStockService.java): service · `src/main/java/ise/rest/exam_pullover/PulloverStockService.java`
- [Pullover stock repository](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/exam_pullover/PulloverStockRepository.java): repository · `src/main/java/ise/rest/exam_pullover/PulloverStockRepository.java`

### Practice REST · 8082

- [Practice server](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/practice/PracticeServerApplication.java): Spring Boot app · Embedded server on port 8082. · `src/main/java/ise/rest/practice/PracticeServerApplication.java`
- [Practice stock resource](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/main/java/ise/rest/practice/PracticeStockResource.java): MVC controller · `src/main/java/ise/rest/practice/PracticeStockResource.java`

### Mutation Verification

- [Mutation drill](https://github.com/xbyxr9/ise-exam-drills/blob/master/src/test/java/ise/drill/MutationDrillTest.java): meta-test · Runs mutant implementations and requires their tests to fail. · `src/test/java/ise/drill/MutationDrillTest.java`
- **Broken implementations**: mutant tests

## Connections

- Gradle wrapper → Gradle build & tasks: invokes
- Gradle build & tasks → Product server: runs task
- Gradle build & tasks → Pullover server: runs task
- Gradle build & tasks → Practice server: runs task
- JUnit domain scenarios → Club registry scenario: contains
- JUnit domain scenarios → Library exam scenario: contains
- EasyMock scenarios → Airlock controller: contains
- EasyMock scenarios → Vehicle management: contains
- Airlock controller → External collaborators: mocked calls
- Vehicle management → External collaborators: mocked calls
- Product server → Product resource: serves HTTP
- Product resource → Product service: delegates
- Product service → Product repository: queries/updates
- Product resource → Shared REST models: uses
- Product client controller → Product resource: calls endpoints
- Pullover server → Pullover stock resource: serves HTTP
- Pullover stock resource → Pullover stock service: delegates
- Pullover stock service → Pullover stock repository: queries/updates
- Practice server → Practice stock resource: serves HTTP
- Mutation drill → Broken implementations: executes
- Gradle build & tasks → Mutation drill: runs tests
