mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/api/TestRemoteEventRegistration.java
@Test
    @SuppressWarnings("unchecked")
    public void testFields()
    {
        //construct message
        EventRegistrationRequestData.Builder data = EventRegistrationRequestData.newBuilder()
                .addTopic("test-topic");
        // add required fields
        EventRegistrationRequestData dataApp = RemoteUtils.appendRequiredFields(data, false).build();
        ServiceRegistration<EventHandler> serviceReg = mock(ServiceRegistration.class);
        RemoteEventRegistration reg = new RemoteEventRegistration(100, serviceReg, dataApp);
        
        assertThat(reg.getServiceRegistration(), is(serviceReg));
        assertThat(reg.getSystemId(), is(100));
        assertThat(reg.getEventRegistrationRequestData(), is(dataApp));
    }
/**
     * Verify fields can be retrieved based on values passed to constructor.
     */
Verify fields can be retrieved based on values passed to constructor.
Verify fields can be retrieved based on values passed to constructor .
@Test
    @SuppressWarnings("unchecked")
    public void testFields()
    {
        EventRegistrationRequestData.Builder data = EventRegistrationRequestData.newBuilder()
                .addTopic("test-topic");
        EventRegistrationRequestData dataApp = RemoteUtils.appendRequiredFields(data, false).build();
        ServiceRegistration<EventHandler> serviceReg = mock(ServiceRegistration.class);
        RemoteEventRegistration reg = new RemoteEventRegistration(100, serviceReg, dataApp);
        assertThat(reg.getServiceRegistration(), is(serviceReg));
        assertThat(reg.getSystemId(), is(100));
        assertThat(reg.getEventRegistrationRequestData(), is(dataApp));
    }
@ Test @ SuppressWarnings ( "unchecked" ) public void testFields ( ) { EventRegistrationRequestData . Builder data = EventRegistrationRequestData . newBuilder ( ) . addTopic ( "test-topic" ) ; EventRegistrationRequestData dataApp = RemoteUtils . appendRequiredFields ( data , false ) . build ( ) ; ServiceRegistration < EventHandler > serviceReg = mock ( ServiceRegistration . class ) ; RemoteEventRegistration reg = new RemoteEventRegistration ( 100 , serviceReg , dataApp ) ; assertThat ( reg . getServiceRegistration ( ) , is ( serviceReg ) ) ; assertThat ( reg . getSystemId ( ) , is ( 100 ) ) ; assertThat ( reg . getEventRegistrationRequestData ( ) , is ( dataApp ) ) ; }
Verify fields can be retrieved based on values passed to constructor.
Verify fields can be retrieved based on values passed to constructor .
//construct message // add required fields