@Test
public void shouldFireCompletedEventIfSuspensionWasSuccessful() throws Exception {

    final UUID commandId = randomUUID();
    final ZonedDateTime stateChangedAt = new UtcClock().now();
    final SuspensionCommand suspensionCommand = new SuspendCommand();
    final List<SuspensionResult> successfulResults = asList(mock(SuspensionResult.class), mock(SuspensionResult.class));
    final List<String> suspendableNames = asList("Suspendable_1", "Suspendable_2");
    when(suspensionResultsMapper.getSuspendablesNames(successfulResults)).thenReturn(suspendableNames);
    when(clock.now()).thenReturn(stateChangedAt);
    suspensionPostProcess.completeSuspensionSuccessfully(successfulResults, commandId, suspensionCommand);
    verify(systemCommandStateChangedEventFirer).fire(systemCommandStateChangedEventCaptor.capture());
    final SystemCommandStateChangedEvent stateChangedEvent = systemCommandStateChangedEventCaptor.getValue();
    assertThat(stateChangedEvent.getCommandId(), is(commandId));
    assertThat(stateChangedEvent.getSystemCommand(), is(suspensionCommand));
    assertThat(stateChangedEvent.getCommandState(), is(COMMAND_COMPLETE));
    assertThat(stateChangedEvent.getStatusChangedAt(), is(stateChangedAt));
    assertThat(stateChangedEvent.getMessage(), is("SUSPEND completed successfully for [Suspendable_1, Suspendable_2]"));
}