/** * Tests the accuracy of the getter getResponseText(). * * <p>Using validated setter to test. */ public void testGetter_GetResponseText() { screeningResponse.setResponseText(defaultText); assertEquals( "The responseText should be got correctly.", defaultText, screeningResponse.getResponseText()); }
/** * Tests the accuracy of the setter setResponseText(String). * * <p>Using reflection. */ public void testSetter_SetResponseText() { screeningResponse.setResponseText(defaultText); // Gets responseCode by reflection. Object responseText = AccuracyTestHelper.getPrivateField( ScreeningResponse.class, screeningResponse, "responseText"); assertEquals("The responseText should be set correctly.", defaultText, responseText); }