@Test
public void givenOneEmployee_whenGetEmployees_thenReturnCorrectJson() throws Exception {

    Employee employee = new EmployeeTestBuilder()
            .withIncome(200)
            .withFirstName("firstName")
            .build();
    EmployeeTo employeeTo = new EmployeeTo(employee.getFirstName(), employee.getLastName(), employee.getEmail(), employee.getIncome(), Money.parse("EUR 200"), 1L, 0l);
    String expectedJSON = new Jackson2JsonObjectMapper().toJson(asList(employeeTo));
    when(presentationEmployeeRepository.getEmployees(0, 10)).thenReturn(asList(employeeTo));
    MvcResult mvcResult = mockMvc.perform(get("/employees?page=0&pageSize=10").contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().isOk())
            .andReturn();
    String actualJSON = mvcResult.getResponse().getContentAsString();
    assertThat(actualJSON).isEqualTo(expectedJSON);
}