### Question:
ClassInformation { public Field[] getFields() { return fields.values().toArray(new Field[fields.size()]); } protected  ClassInformation(); Field[] getFields(); Field getFieldByName(String aFieldName); Method getMethodByName(String aMethodName); Method[] getMethods();  }### Answer:
@Test public void testGetFields() throws Exception { Field theField = mock(Field.class); when(theField.getName()).thenReturn("Field1"); information.register(theField); Field[] theFields = information.getFields(); assertEquals(1, theFields.length); assertSame(theField, theFields[0]); }