edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/TestNovatelAsset.java
@Test
    public void testStatusFromStatusServicePosts() throws AssetException, IOException, ValidationFailedException, 
        IllegalArgumentException, PersistenceFailedException
    {
        //mock status
        Status status = mock(Status.class);
        when(status.getSummaryStatus()).thenReturn(new OperatingStatus(SummaryStatusEnum.GOOD, "asdf"));
        
        //component status
        ComponentStatus compStat = createComponentStatus(
                ComponentTypeEnum.SOFTWARE_UNIT, "plugin", SummaryStatusEnum.GOOD, "goodness");
        
        when(m_NovatelStatusService.getStatus(Mockito.any(Observation.class), 
                Mockito.any(ComponentStatus.class))).thenReturn(status);
        
        //handle status
        m_SUT.handleStatusUpdate(compStat);
        
        //verify dep interactions
        verify(m_AssetContext).setStatus(status);
    }
/**
     * Test the status returned from the status service is posted as an observation.
     */
Test the status returned from the status service is posted as an observation.
Test the status returned from the status service is posted as an observation .
@Test
    public void testStatusFromStatusServicePosts() throws AssetException, IOException, ValidationFailedException, 
        IllegalArgumentException, PersistenceFailedException
    {
        Status status = mock(Status.class);
        when(status.getSummaryStatus()).thenReturn(new OperatingStatus(SummaryStatusEnum.GOOD, "asdf"));
        ComponentStatus compStat = createComponentStatus(
                ComponentTypeEnum.SOFTWARE_UNIT, "plugin", SummaryStatusEnum.GOOD, "goodness");
        when(m_NovatelStatusService.getStatus(Mockito.any(Observation.class), 
                Mockito.any(ComponentStatus.class))).thenReturn(status);
        m_SUT.handleStatusUpdate(compStat);
        verify(m_AssetContext).setStatus(status);
    }
@ Test public void testStatusFromStatusServicePosts ( ) throws AssetException , IOException , ValidationFailedException , IllegalArgumentException , PersistenceFailedException { Status status = mock ( Status . class ) ; when ( status . getSummaryStatus ( ) ) . thenReturn ( new OperatingStatus ( SummaryStatusEnum . GOOD , "asdf" ) ) ; ComponentStatus compStat = createComponentStatus ( ComponentTypeEnum . SOFTWARE_UNIT , "plugin" , SummaryStatusEnum . GOOD , "goodness" ) ; when ( m_NovatelStatusService . getStatus ( Mockito . any ( Observation . class ) , Mockito . any ( ComponentStatus . class ) ) ) . thenReturn ( status ) ; m_SUT . handleStatusUpdate ( compStat ) ; verify ( m_AssetContext ) . setStatus ( status ) ; }
Test the status returned from the status service is posted as an observation.
Test the status returned from the status service is posted as an observation .
//mock status //component status //handle status //verify dep interactions