### Question:
MetadataField { public static MetadataField[] findAll(Context context) throws SQLException { List<MetadataField> fields = new ArrayList<MetadataField>(); TableRowIterator tri = DatabaseManager.queryTable(context, "MetadataFieldRegistry", "SELECT mfr.* FROM MetadataFieldRegistry mfr, MetadataSchemaRegistry msr where mfr.metadata_schema_id= msr.metadata_schema_id ORDER BY msr.short_id, mfr.element, mfr.qualifier"); try { while (tri.hasNext()) { fields.add(new MetadataField(tri.next())); } } finally { if (tri != null) { tri.close(); } } MetadataField[] typeArray = new MetadataField[fields.size()]; return (MetadataField[]) fields.toArray(typeArray); } MetadataField();  MetadataField(MetadataSchema schema);  MetadataField(MetadataSchema schema, String element,
            String qualifier, String scopeNote);  MetadataField(int schemaID, int fieldID, String element,
            String qualifier, String scopeNote);  MetadataField(TableRow row); String getElement(); void setElement(String element); int getFieldID(); String getQualifier(); void setQualifier(String qualifier); int getSchemaID(); void setSchemaID(int schemaID); String getScopeNote(); void setScopeNote(String scopeNote); void create(Context context); static MetadataField findByElement(Context context, int schemaID,
            String element, String qualifier); static MetadataField[] findAll(Context context); static MetadataField[] findAllInSchema(Context context, int schemaID); void update(Context context); void delete(Context context); static String formKey(String schema, String element, String qualifier); static MetadataField find(Context context, int id); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testFindAll() throws Exception { MetadataField[] found = MetadataField.findAll(context); assertThat("testFindAll 0",found, notNullValue()); assertTrue("testFindAll 1",found.length >= 1); boolean added = false; for(MetadataField mdf: found) { if(mdf.equals(mf)) { added = true; } } assertTrue("testFindAll 2",added); }