Restito - mocking framework for testing rest clients
Clone or download

Restito - testing framework for rest clients Build Status Maven Central

Restito is a tool which is inspired by mockito and functionally is diametrically opposite to the Rest Assured.

Restito provides a DSL to:

  • Mimic rest server behavior
  • Record HTTP calls to the server
  • Perform verification against happened calls

Which means that it helps you to test an application which makes calls to some HTTP service. Restito sets up a StubServer instance which responds to your application's Calls based on defined Stubs. A stub makes some Action to response when Condition is respected.

For more motivation, please read Motivation section of the Developer's guide.

Developer's guide is the best place to start. FOR LOTS OF EXAMPLES CLICK -> HERE <- :-)

For more details you can also check Restito's javadoc.

Quick example:

package com.xebialabs.restito;


public class SimpleRequestsTest {

    private StubServer server;

    public void start() {
        server = new StubServer().run();
        RestAssured.port = server.getPort();

    public void stop() {

    public void shouldPassVerification() {
        // Restito

        // Rest-assured

        // Restito


Maven instructions


Building instructions

$ gradle clean build