Revolut test
Design and implement a RESTful API (including data model and the backing implementation) for money transfers between accounts.
Explicit requirements:
- You can use Java, Scala or Kotlin.
- Keep it simple and to the point (e.g. no need to implement any authentication).
- Assume the API is invoked by multiple systems and services on behalf of end users.
- You can use frameworks/libraries if you like (except Spring), but don't forget about
requirement #2 – keep it simple and avoid heavy frameworks. - The datastore should run in-memory for the sake of this test.
- The final result should be executable as a standalone program (should not require
a pre-installed container/server). - Demonstrate with tests that the API works as expected.
Implicit requirements:
- The code produced by you is expected to be of high quality.
- There are no detailed requirements, use common sense.
Information
Libraries
Web container to serve the app
- Jetty
REST API (JAX-RS)
- Jersey
In-memory database
- H2
Database migration
- Flyway
Load application properties file
- Commons Configuration2
- Commons Beanutils
Hosted continuous integration service
- Travis CI
Unit test
- JUnit 5
- Mockito
Code coverage
- JaCoCo
RestFul integration test
- REST Assured
A code generator for bean mappings
- MapStruct
Instructions
Test
$ gradlew test
Build
$ gradlew build
Run
$ java -jar revolut-1.0-all.jar