@Test
public void testReceiveOutboundCommand() {

    // Setup
    final OutboundCommand command = mock(OutboundCommand.class);
    when(mockCommandRepository.exists(anyString())).thenReturn(true);
    when(mockCommandRepository.findOne(anyString())).thenReturn(command);
    when(command.buildMeta()).thenReturn(mockCommandMeta);
    when(mockEnvironment.getProperty(same("kermoss.serviceName"), anyString())).thenReturn("source");
    // Run the test
    commandOrchestratorImplUnderTest.receive(command);
    // Verify the results
    verify(mockPublisher).publishEvent(any(OutboundCommandStarted.class));
    verify(command).setSource("source");
}