# Testing

## Run Tests

```powershell
mvn test
```

## Current Test Suite

Located in:

- `src/test/java/vassistent/model/AppStateTest`
- `src/test/java/vassistent/service/AnimationFileServiceTest`
- `src/test/java/vassistent/service/BinaryEventServiceTest`
- `src/test/java/vassistent/service/DataPersistenceServiceTest`
- `src/test/java/vassistent/service/EvaluationServiceTest`
- `src/test/java/vassistent/service/MqttClientServiceTest`
- `src/test/java/vassistent/service/ProcessManagerServiceTest`
- `src/test/java/vassistent/service/StatisticsServiceTest`

Coverage focus:

- state change notifications
- payload validation and processing flow
- level evaluation thresholds
- MQTT lifecycle and topic routing
- process launch/shutdown command sequencing
- animation file output mapping
- SQLite persistence behavior
- rolling averages and ratio calculations

## Current Status (Java 17)

- full suite passes with `mvn test`
- test stack:
  - `org.junit.jupiter:junit-jupiter`
  - `org.mockito:mockito-junit-jupiter`

## Notes

- some tests are integration-style and use temporary SQLite databases
- test output may include logger lines because services log during execution
