@Test
public void shouldReturnListOfBooks() throws Exception {

	when(bookService.findAll()).thenReturn(Arrays.asList(
			new Book("123", "Spring 5 Recipes", "Marten Deinum", "Josh Long"),
			new Book("321", "Pro Spring MVC", "Marten Deinum", "Colin Yates")));
	mockMvc.perform(get("/books"))
			.andExpect(status().isOk())
			.andExpect(MockMvcResultMatchers.jsonPath("$", Matchers.hasSize(2)))
			.andExpect(MockMvcResultMatchers.jsonPath("$[*].isbn", Matchers.containsInAnyOrder("123", "321")))
			.andExpect(MockMvcResultMatchers.jsonPath("$[*].title", Matchers.containsInAnyOrder("Spring 5 Recipes", "Pro Spring MVC")));
}