edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/TestNovatelStatusService.java
@Test
    public void testSameCompStatusDiffDescription()
    {
        //new status component
        List<SummaryStatusEnum> statuses = Arrays.asList(SummaryStatusEnum.GOOD, SummaryStatusEnum.GOOD);
        m_ComponentTypes = Arrays.asList(m_MessageReaderIdentifier, m_TimeServiceIdentifier);
        m_Descriptors = Arrays.asList(m_MessageReaderDesc, m_TimeDesc);
        List<ComponentStatus> list = getMockComponentStatuses(m_ComponentTypes, m_Descriptors, statuses);
        Status status = getLastStatus(list);
        Observation observation = new Observation();
        observation.setStatus(status);

        //change a description
        ComponentType componentType = new ComponentType(m_MessageReaderIdentifier, m_MessageReaderDesc);
        Status newStatus = m_SUT.getStatus(observation, 
                new ComponentStatus(componentType, new OperatingStatus(SummaryStatusEnum.GOOD, "I am different")));
        
        assertThat(newStatus, is(notNullValue()));
        
        //inspect
        Map<ComponentTypeEnum, String> typeWithSumDescription = new HashMap<>();
        for (ComponentStatus statusFromList : newStatus.getComponentStatuses())
        {
            typeWithSumDescription.put(statusFromList.getComponent().getType(), 
                    statusFromList.getStatus().getDescription());
        }
        assertThat(typeWithSumDescription.get(ComponentTypeEnum.NAVIGATION), is("I am different"));
    }
/**
     * Verify that if a component status description changes, but the summary is NOT different
     * that the status is updated.
     */
Verify that if a component status description changes, but the summary is NOT different
that the status is updated.
Verify that if a component status description changes but the summary is NOT different that the status is updated .
@Test
    public void testSameCompStatusDiffDescription()
    {
        List<SummaryStatusEnum> statuses = Arrays.asList(SummaryStatusEnum.GOOD, SummaryStatusEnum.GOOD);
        m_ComponentTypes = Arrays.asList(m_MessageReaderIdentifier, m_TimeServiceIdentifier);
        m_Descriptors = Arrays.asList(m_MessageReaderDesc, m_TimeDesc);
        List<ComponentStatus> list = getMockComponentStatuses(m_ComponentTypes, m_Descriptors, statuses);
        Status status = getLastStatus(list);
        Observation observation = new Observation();
        observation.setStatus(status);
        ComponentType componentType = new ComponentType(m_MessageReaderIdentifier, m_MessageReaderDesc);
        Status newStatus = m_SUT.getStatus(observation, 
                new ComponentStatus(componentType, new OperatingStatus(SummaryStatusEnum.GOOD, "I am different")));
        assertThat(newStatus, is(notNullValue()));
        Map<ComponentTypeEnum, String> typeWithSumDescription = new HashMap<>();
        for (ComponentStatus statusFromList : newStatus.getComponentStatuses())
        {
            typeWithSumDescription.put(statusFromList.getComponent().getType(), 
                    statusFromList.getStatus().getDescription());
        }
        assertThat(typeWithSumDescription.get(ComponentTypeEnum.NAVIGATION), is("I am different"));
    }
@ Test public void testSameCompStatusDiffDescription ( ) { List < SummaryStatusEnum > statuses = Arrays . asList ( SummaryStatusEnum . GOOD , SummaryStatusEnum . GOOD ) ; m_ComponentTypes = Arrays . asList ( m_MessageReaderIdentifier , m_TimeServiceIdentifier ) ; m_Descriptors = Arrays . asList ( m_MessageReaderDesc , m_TimeDesc ) ; List < ComponentStatus > list = getMockComponentStatuses ( m_ComponentTypes , m_Descriptors , statuses ) ; Status status = getLastStatus ( list ) ; Observation observation = new Observation ( ) ; observation . setStatus ( status ) ; ComponentType componentType = new ComponentType ( m_MessageReaderIdentifier , m_MessageReaderDesc ) ; Status newStatus = m_SUT . getStatus ( observation , new ComponentStatus ( componentType , new OperatingStatus ( SummaryStatusEnum . GOOD , "I am different" ) ) ) ; assertThat ( newStatus , is ( notNullValue ( ) ) ) ; Map < ComponentTypeEnum , String > typeWithSumDescription = new HashMap < > ( ) ; for ( ComponentStatus statusFromList : newStatus . getComponentStatuses ( ) ) { typeWithSumDescription . put ( statusFromList . getComponent ( ) . getType ( ) , statusFromList . getStatus ( ) . getDescription ( ) ) ; } assertThat ( typeWithSumDescription . get ( ComponentTypeEnum . NAVIGATION ) , is ( "I am different" ) ) ; }
Verify that if a component status description changes, but the summary is NOT different
 that the status is updated.
Verify that if a component status description changes but the summary is NOT different that the status is updated .
//new status component //change a description //inspect