mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/TestBundleMgrImpl.java
@Test
    public void testBundleEventError()
    {
        GetBundleInfoRequestData req = GetBundleInfoRequestData.newBuilder().setBundleId(0).build();
        TerraHarvestMessage thMessage = TerraHarvestMessageHelper.createTerraHarvestMessage(25, 0, Namespace.Bundle, 0,
                req);
        BundleNamespaceErrorData errorMsg = BundleNamespaceErrorData.newBuilder().setError(
                BundleErrorCode.OSGiBundleException).setErrorDescription("Error Description!").build();

        Map<String, Object> props = new HashMap<>();
        props.put(RemoteConstants.EVENT_PROP_MESSAGE, thMessage);
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, BundleMessageType.BundleNamespaceError.toString());
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, errorMsg);
        m_Event = new Event(BundleMgr.TOPIC_BUNDLE_INFO_RECEIVED, props);

        m_BundleHelper.handleEvent(m_Event);
        
        verify(m_GrowlUtil).createGlobalFacesMessage(eq(FacesMessage.SEVERITY_ERROR), Mockito.anyString(), 
                Mockito.anyString());
    }
/**
     * Test the local event handler handling a bundle error message.
     * Verify that a growl message with the error information is displayed when an error message is received.
     */
Test the local event handler handling a bundle error message.
Verify that a growl message with the error information is displayed when an error message is received.
Test the local event handler handling a bundle error message . Verify that a growl message with the error information is displayed when an error message is received .
@Test
    public void testBundleEventError()
    {
        GetBundleInfoRequestData req = GetBundleInfoRequestData.newBuilder().setBundleId(0).build();
        TerraHarvestMessage thMessage = TerraHarvestMessageHelper.createTerraHarvestMessage(25, 0, Namespace.Bundle, 0,
                req);
        BundleNamespaceErrorData errorMsg = BundleNamespaceErrorData.newBuilder().setError(
                BundleErrorCode.OSGiBundleException).setErrorDescription("Error Description!").build();
        Map<String, Object> props = new HashMap<>();
        props.put(RemoteConstants.EVENT_PROP_MESSAGE, thMessage);
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, BundleMessageType.BundleNamespaceError.toString());
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, errorMsg);
        m_Event = new Event(BundleMgr.TOPIC_BUNDLE_INFO_RECEIVED, props);
        m_BundleHelper.handleEvent(m_Event);
        verify(m_GrowlUtil).createGlobalFacesMessage(eq(FacesMessage.SEVERITY_ERROR), Mockito.anyString(), 
                Mockito.anyString());
    }
@ Test public void testBundleEventError ( ) { GetBundleInfoRequestData req = GetBundleInfoRequestData . newBuilder ( ) . setBundleId ( 0 ) . build ( ) ; TerraHarvestMessage thMessage = TerraHarvestMessageHelper . createTerraHarvestMessage ( 25 , 0 , Namespace . Bundle , 0 , req ) ; BundleNamespaceErrorData errorMsg = BundleNamespaceErrorData . newBuilder ( ) . setError ( BundleErrorCode . OSGiBundleException ) . setErrorDescription ( "Error Description!" ) . build ( ) ; Map < String , Object > props = new HashMap < > ( ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE , thMessage ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE_TYPE , BundleMessageType . BundleNamespaceError . toString ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_DATA_MESSAGE , errorMsg ) ; m_Event = new Event ( BundleMgr . TOPIC_BUNDLE_INFO_RECEIVED , props ) ; m_BundleHelper . handleEvent ( m_Event ) ; verify ( m_GrowlUtil ) . createGlobalFacesMessage ( eq ( FacesMessage . SEVERITY_ERROR ) , Mockito . anyString ( ) , Mockito . anyString ( ) ) ; }
Test the local event handler handling a bundle error message.
Test the local event handler handling a bundle error message .