@Before
  public void setUp() throws Exception {

    configuration = new RepositoryRestConfiguration();

    handlerMapping = new RepositoryRestHandlerMapping(mappings, configuration);
    handlerMapping.setApplicationContext(CONTEXT);
    handlerMapping.afterPropertiesSet();

    mockRequest = new MockHttpServletRequest();

    listEntitiesMethod =
        RepositoryEntityController.class.getMethod(
            "listEntities", RootResourceInformation.class, Pageable.class, Sort.class);
  }