mil.dod.th.ose.controller/test/mil/dod/th/ose/controller/impl/TestTerraHarvestControllerImpl.java
@Test
    public void testDefaultId() throws IOException
    {
        assertThat(m_SUT.getId(), is(0));
        
        ArgumentCaptor<File> fileCaptor = ArgumentCaptor.forClass(File.class);
        verify(m_FileService, atLeastOnce()).createFileOutputStream(fileCaptor.capture());
        assertThat(fileCaptor.getValue().getPath(), is(EXPECTED_TH_SYSTEM_PROPERTIES_FILENAME));
        assertThat(new String(m_OutputData.toByteArray()), containsString("id=0x00000000"));
    }
/**
     * This tests the behavior of the class if a)the th.system.properties file is not found. Verifies default values are
     * set in file if not there.
     */
This tests the behavior of the class if a)the th.system.properties file is not found. Verifies default values are
set in file if not there.
This tests the behavior of the class if a ) the th . system . properties file is not found . Verifies default values are set in file if not there .
@Test
    public void testDefaultId() throws IOException
    {
        assertThat(m_SUT.getId(), is(0));
        ArgumentCaptor<File> fileCaptor = ArgumentCaptor.forClass(File.class);
        verify(m_FileService, atLeastOnce()).createFileOutputStream(fileCaptor.capture());
        assertThat(fileCaptor.getValue().getPath(), is(EXPECTED_TH_SYSTEM_PROPERTIES_FILENAME));
        assertThat(new String(m_OutputData.toByteArray()), containsString("id=0x00000000"));
    }
@ Test public void testDefaultId ( ) throws IOException { assertThat ( m_SUT . getId ( ) , is ( 0 ) ) ; ArgumentCaptor < File > fileCaptor = ArgumentCaptor . forClass ( File . class ) ; verify ( m_FileService , atLeastOnce ( ) ) . createFileOutputStream ( fileCaptor . capture ( ) ) ; assertThat ( fileCaptor . getValue ( ) . getPath ( ) , is ( EXPECTED_TH_SYSTEM_PROPERTIES_FILENAME ) ) ; assertThat ( new String ( m_OutputData . toByteArray ( ) ) , containsString ( "id=0x00000000" ) ) ; }
This tests the behavior of the class if a)the th.system.properties file is not found.
This tests the behavior of the class if a ) the th . system . properties file is not found .