### Question:
FilterUtility { public static boolean matchesSchemaKey(SchemaKey key, SchemaKeyQuery schemaKeyQuery) { if (schemaKeyQuery == null) { return true; } if (!matches(key.getDomain(), schemaKeyQuery.getDomainRegex())) { return false; } return matches(key.getName(), schemaKeyQuery.getNameRegex()); }  static boolean matches(String nullableValue, String nullableRegex); static boolean matchesInt(Integer value, Integer required); static boolean matchesSpecification(Specification specification, SpecificationQuery specQuery); static boolean matchesSchemaKey(SchemaKey key, SchemaKeyQuery schemaKeyQuery);  }### Answer:
@Test public void matchesSchemaKey() { SchemaKeyQuery schemaKeyQuery = null; SchemaKey schemaKey = new SchemaKey(); assertTrue(FilterUtility.matchesSchemaKey(schemaKey, schemaKeyQuery)); schemaKeyQuery = builder().domainRegex(REGEX).nameRegex(REGEX).build(); assertFalse(FilterUtility.matchesSchemaKey(schemaKey, schemaKeyQuery)); schemaKey.setDomain(MATCH); schemaKey.setName(MATCH); assertTrue(FilterUtility.matchesSchemaKey(schemaKey, schemaKeyQuery)); schemaKey.setDomain(MATCH); schemaKey.setName(FAIL); assertFalse(FilterUtility.matchesSchemaKey(schemaKey, schemaKeyQuery)); schemaKey.setDomain(FAIL); schemaKey.setName(MATCH); assertFalse(FilterUtility.matchesSchemaKey(schemaKey, schemaKeyQuery)); }