edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/TestNovatelAsset.java
@Test
    public void testDisableTimeServiceChangeCall() throws IllegalArgumentException, IllegalStateException, 
        FactoryException, AssetException, NovatelMessageException, ValidationFailedException
    {
        //mock message
        when(m_Parser.parseInsMessage(m_InsData)).thenReturn(m_Message);
        
        final Map<String, Object> configProps = createConfigProps();
        configProps.put(NovatelAssetAttributes.CONFIG_PROP_SYNC_SYSTEM_TIME_WITH_GPS, false);
        configProps.put(NovatelAssetAttributes.CONFIG_PROP_HANDLE_MESSAGE_FREQUENCY, 1);
        m_SUT.updated(configProps);
        m_SUT.onActivate();
        
        m_SUT.handleDataString(m_InsData);
        
        //interactions
        verify(m_TimeChangeService, never()).changeTime(anyLong());
        
        verify(m_AssetContext).persistObservation(Mockito.any(Observation.class));
    }
/**
     * Verify that if the time service is disabled that the change time method is not invoked.
     */
Verify that if the time service is disabled that the change time method is not invoked.
Verify that if the time service is disabled that the change time method is not invoked .
@Test
    public void testDisableTimeServiceChangeCall() throws IllegalArgumentException, IllegalStateException, 
        FactoryException, AssetException, NovatelMessageException, ValidationFailedException
    {
        when(m_Parser.parseInsMessage(m_InsData)).thenReturn(m_Message);
        final Map<String, Object> configProps = createConfigProps();
        configProps.put(NovatelAssetAttributes.CONFIG_PROP_SYNC_SYSTEM_TIME_WITH_GPS, false);
        configProps.put(NovatelAssetAttributes.CONFIG_PROP_HANDLE_MESSAGE_FREQUENCY, 1);
        m_SUT.updated(configProps);
        m_SUT.onActivate();
        m_SUT.handleDataString(m_InsData);
        verify(m_TimeChangeService, never()).changeTime(anyLong());
        verify(m_AssetContext).persistObservation(Mockito.any(Observation.class));
    }
@ Test public void testDisableTimeServiceChangeCall ( ) throws IllegalArgumentException , IllegalStateException , FactoryException , AssetException , NovatelMessageException , ValidationFailedException { when ( m_Parser . parseInsMessage ( m_InsData ) ) . thenReturn ( m_Message ) ; final Map < String , Object > configProps = createConfigProps ( ) ; configProps . put ( NovatelAssetAttributes . CONFIG_PROP_SYNC_SYSTEM_TIME_WITH_GPS , false ) ; configProps . put ( NovatelAssetAttributes . CONFIG_PROP_HANDLE_MESSAGE_FREQUENCY , 1 ) ; m_SUT . updated ( configProps ) ; m_SUT . onActivate ( ) ; m_SUT . handleDataString ( m_InsData ) ; verify ( m_TimeChangeService , never ( ) ) . changeTime ( anyLong ( ) ) ; verify ( m_AssetContext ) . persistObservation ( Mockito . any ( Observation . class ) ) ; }
Verify that if the time service is disabled that the change time method is not invoked.
Verify that if the time service is disabled that the change time method is not invoked .
//mock message //interactions