@Test
public void shouldGetSystemCommandStatusFromTheRepository() throws Exception {

    final UUID commandId = randomUUID();
    final Optional<SystemCommandStatus> systemCommandStatus = of(mock(SystemCommandStatus.class));
    when(systemCommandStatusRepository.findLatestStatusById(commandId)).thenReturn(systemCommandStatus);
    assertThat(systemCommandStateBean.getCommandStatus(commandId), is(systemCommandStatus));
}