/revolut-test

Design and implement a RESTful API (including data model and the backing implementation) for money transfers between accounts.

Primary LanguageJava

Build Status

Revolut test

Design and implement a RESTful API (including data model and the backing implementation) for money transfers between accounts.

Explicit requirements:

  1. You can use Java, Scala or Kotlin.
  2. Keep it simple and to the point (e.g. no need to implement any authentication).
  3. Assume the API is invoked by multiple systems and services on behalf of end users.
  4. You can use frameworks/libraries if you like (except Spring), but don't forget about
    requirement #2 – keep it simple and avoid heavy frameworks.
  5. The datastore should run in-memory for the sake of this test.
  6. The final result should be executable as a standalone program (should not require
    a pre-installed container/server).
  7. Demonstrate with tests that the API works as expected.

Implicit requirements:

  1. The code produced by you is expected to be of high quality.
  2. 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