https://github.com/luizkowalski/n26-stats
https://github.com/luizkowalski/n26-stats
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/luizkowalski/n26-stats
- Owner: luizkowalski
- Created: 2016-12-02T14:00:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-03T22:49:02.000Z (almost 9 years ago)
- Last Synced: 2025-02-04T21:46:12.405Z (8 months ago)
- Language: Java
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# N26 Challenge
Small service to aggregate transactions and provide statistics about them.
Only transactions from last minute are taken into account.### Implementation
I used `ConcurrentNavigableMap` as data store. It allows me to navigate through the list using the timestamp as key.
The method `tailMap` will return a submap with transactions grouped by timestamp where they key is >= the timestamp specified.
Aggregation is done using `DoubleSummaryStatistics` already provided by Java 8 API.### Running
To run it, you can use
```java
mvn spring-boot:run
```The endpoints will be available at `http://127.0.0.1:8080/`
### Testing
To run the test suit, execute
```java
mvn test
```