Test application based on jooby framework. REST API for money transfers between accounts.
Database schema located in application.conf (of course I know about flyway, liquibase etc :)
Main test scenario can be founded in AppTest :: createTwoAccountsAndMakeTransfersBetweenThemTest
How to start application (will start on http://localhost:8080/):
$ mvn package
$ java -jar target/transferator-1.0-SNAPSHOT.jar
POST /account
GET /account/:id
GET /account?name="Ivan"
GET /account/:accountId/balance
GET /account/:accountId/transactions
POST /transaction
GET /transaction/:operationUuid
curl -X POST \
http://localhost:8080/account \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"name": "Test"}'
curl -X GET \
http://localhost:8080/account/1 \
-H 'Accept: application/json'
curl -X GET \
'http://localhost:8080/account?name=Test' \
-H 'Accept: application/json'
curl -X GET \
http://localhost:8080/account/1/balance \
-H 'Accept: application/json'
curl -X GET \
http://localhost:8080/account/1/transactions \
-H 'Accept: application/json'
curl -X POST \
http://localhost:8080/transaction \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"senderId": 1,
"recipientId": 2,
"amount": 100
}'
curl -X GET \
http://localhost:8080/transaction/8a709f3a-9dba-4704-acaf-e939e9a67da3 \
-H 'Accept: application/json'