This project was an assignment. Implemented code would be a nice example of real-time summery generation and how to impletement circular queue / ring buffer.
EVBox Charging Station Sessions APIs provides - Create session. - Stop session. - Real-time summery of session using Time Wheel data structure.
Create session
curl -X POST localhost:8080/chargingSession
example response
{"id":"bda6acd8-aa5f-463f-a9de-cff8d3e226e2"}
Stop session (id from above call)
curl -X PUT localhost:8080/chargingSession/bda6acd8-aa5f-463f-a9de-cff8d3e226e2
Get summery
curl -X GET localhost:8080/chargingSessions
example response
{"totalCount":0,"startedCount":0,"stoppedCount":1}
Get started session summery
curl -X GET localhost:8080/chargingSessions/started
example response
{"startedCount":0}
Get stopped session summery
curl -X GET localhost:8080/chargingSessions/stopped
example response
{"stoppedCount":0}
To run the unit tests, execute the following commands
mvn clean test-compile test
To run the integration tests, execute the following commands
mvn clean test-compile verify -DskipTests=true
To run the integration tests, execute the following commands
mvn clean test-compile verify