### Question:
MetadataField { public static MetadataField[] findAllInSchema(Context context, int schemaID) throws SQLException { List<MetadataField> fields = new ArrayList<MetadataField>(); TableRowIterator tri = DatabaseManager.queryTable(context,"MetadataFieldRegistry", "SELECT * FROM MetadataFieldRegistry WHERE metadata_schema_id= ? " + " ORDER BY element, qualifier", schemaID); 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 testFindAllInSchema() throws Exception { MetadataField[] found = MetadataField.findAllInSchema(context, MetadataSchema.DC_SCHEMA_ID); assertThat("testFindAllInSchema 0",found, notNullValue()); assertTrue("testFindAllInSchema 1",found.length >= 1); assertTrue("testFindAllInSchema 2",found.length <= MetadataField.findAll(context).length); boolean added = false; for(MetadataField mdf: found) { if(mdf.equals(mf)) { added = true; } } assertTrue("testFindAllInSchema 3",added); }