### Question:
TodoGatewayApplicationService { public Response createTodo(final String newTodo) { LOG.debug("Request createTodo of todo {}", newTodo); return client.createTodo(newTodo); }  Response createTodo(final String newTodo); Response deleteTodo(final Long todoId); Response getTodo(final Long todoId); Response getTodos(); Response updateTodo(final Long todoId, final String modifiedTodo);  }### Answer:
@Test public void createTodo() { Mockito.when(response.getStatus()).thenReturn(Response.Status.CREATED.getStatusCode()); Mockito.when(client.createTodo(Mockito.anyString())).thenReturn(response); Response response = service.createTodo("{\n" + " \"title\": \"clean fridge\",\n" + " \"description\": \"It's a mess\",\n" + " \"dueDate\": \"2018-01-01T12:34:56Z\"\n" + "}"); assertThat(response.getStatus()).isEqualTo(Response.Status.CREATED.getStatusCode()); Mockito.verify(client).createTodo(Mockito.anyString()); Mockito.verifyNoMoreInteractions(client); }