public EndpointResponse getAllStatuses() {
    return EndpointResponse.ok(CommandStatuses.fromFullStatuses(statementExecutor.getStatuses()));
  }
@Test
  public void testGetAllStatuses() {
    final StatusResource testResource = getTestStatusResource();

    final Object statusesEntity = testResource.getAllStatuses().getEntity();
    assertThat(statusesEntity, instanceOf(CommandStatuses.class));
    final CommandStatuses testCommandStatuses = (CommandStatuses) statusesEntity;

    final Map<CommandId, CommandStatus.Status> expectedCommandStatuses =
        CommandStatuses.fromFullStatuses(mockCommandStatuses);

    assertEquals(expectedCommandStatuses, testCommandStatuses);
  }