mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/utils/TestReflectionsUtil.java
@Test
    public void testUnsetField() throws ReflectionsUtilException
    {
        //Verify if a field with no unset method calls the unset field method then it attempts to use the fields setter
        //method instead.
        assertThat(m_Obj.getTestDouble(), is(5.25));
        ReflectionsUtil.unsetField(m_Obj, "TestDouble");
        assertThat(m_Obj.getTestDouble(), is(nullValue()));
        
        //Verify if a field with an unset method class the unsetField method then the value is set to null for that
        //field.
        assertThat(m_Obj.getTestInteger(), is(1));
        ReflectionsUtil.unsetField(m_Obj, "TestInteger");
        try
        {
            m_Obj.getTestInteger();
            fail("Null pointer exception should be thrown since get method returns a primitive integer.");
        }
        catch (NullPointerException ex)
        {
            //expected exception
        }
    }
/**
     * Verify that the unset method sets the specified field to null either through the unset method or through the
     * fields setter methods.
     */
Verify that the unset method sets the specified field to null either through the unset method or through the
fields setter methods.
Verify that the unset method sets the specified field to null either through the unset method or through the fields setter methods .
@Test
    public void testUnsetField() throws ReflectionsUtilException
    {
        assertThat(m_Obj.getTestDouble(), is(5.25));
        ReflectionsUtil.unsetField(m_Obj, "TestDouble");
        assertThat(m_Obj.getTestDouble(), is(nullValue()));
        assertThat(m_Obj.getTestInteger(), is(1));
        ReflectionsUtil.unsetField(m_Obj, "TestInteger");
        try
        {
            m_Obj.getTestInteger();
            fail("Null pointer exception should be thrown since get method returns a primitive integer.");
        }
        catch (NullPointerException ex)
        {
        }
    }
@ Test public void testUnsetField ( ) throws ReflectionsUtilException { assertThat ( m_Obj . getTestDouble ( ) , is ( 5.25 ) ) ; ReflectionsUtil . unsetField ( m_Obj , "TestDouble" ) ; assertThat ( m_Obj . getTestDouble ( ) , is ( nullValue ( ) ) ) ; assertThat ( m_Obj . getTestInteger ( ) , is ( 1 ) ) ; ReflectionsUtil . unsetField ( m_Obj , "TestInteger" ) ; try { m_Obj . getTestInteger ( ) ; fail ( "Null pointer exception should be thrown since get method returns a primitive integer." ) ; } catch ( NullPointerException ex ) { } }
Verify that the unset method sets the specified field to null either through the unset method or through the
 fields setter methods.
Verify that the unset method sets the specified field to null either through the unset method or through the fields setter methods .
//Verify if a field with no unset method calls the unset field method then it attempts to use the fields setter //method instead. //Verify if a field with an unset method class the unsetField method then the value is set to null for that //field. //expected exception