/** * Helper method to test the getter and setter of a long type field. * * @param object Object that contains the long field * @param attributeName name of field * @param setValue value to be used to test the getters and setters */ public static void doTest(Object object, String attributeName, Object setValue) { ReflectionTestUtils.invokeSetterMethod(object, attributeName, setValue); Object gotValue = ReflectionTestUtils.invokeGetterMethod(object, attributeName); Assert.assertEquals(setValue, gotValue); }