mil.dod.th.ose.shell/test/mil/dod/th/ose/shell/TestTerraHarvestControllerCommands.java
@Test
    public void testInvalidMode()
    {
        final CommandSession testSession = mock(CommandSession.class);
        PrintStream testStream = mock(PrintStream.class);
        when(testSession.getConsole()).thenReturn(testStream);
        
        m_SUT.setMode(testSession, "Invalid");
        
        verify(m_TerraHarvestController, never()).setOperationMode(Mockito.any(OperationMode.class));
        verify(testStream).println("Invalid system mode");
    }
/*
     * Verify that error log is sent when an invalid system mode is set
     */
Verify that error log is sent when an invalid system mode is set
Verify that error log is sent when an invalid system mode is set
@Test
    public void testInvalidMode()
    {
        final CommandSession testSession = mock(CommandSession.class);
        PrintStream testStream = mock(PrintStream.class);
        when(testSession.getConsole()).thenReturn(testStream);
        m_SUT.setMode(testSession, "Invalid");
        verify(m_TerraHarvestController, never()).setOperationMode(Mockito.any(OperationMode.class));
        verify(testStream).println("Invalid system mode");
    }
@ Test public void testInvalidMode ( ) { final CommandSession testSession = mock ( CommandSession . class ) ; PrintStream testStream = mock ( PrintStream . class ) ; when ( testSession . getConsole ( ) ) . thenReturn ( testStream ) ; m_SUT . setMode ( testSession , "Invalid" ) ; verify ( m_TerraHarvestController , never ( ) ) . setOperationMode ( Mockito . any ( OperationMode . class ) ) ; verify ( testStream ) . println ( "Invalid system mode" ) ; }
Verify that error log is sent when an invalid system mode is set
Verify that error log is sent when an invalid system mode is set