### Question:
BySchemaFieldsVerifier extends AbstractVerifier<GenericRecord> { @Override public void init( String subject, ExtendedSchemaRegistryClient schemaRegistryClient, Map<String, ?> config) { super.init(subject, schemaRegistryClient, config); initRequiredFields(); initExpectedFields(); updateAllowedVersionRangeIfNeeded(1); }  @Override void init(
            String subject,
            ExtendedSchemaRegistryClient schemaRegistryClient,
            Map<String, ?> config); @Override VerificationResult verify(GenericRecord data, Schema originalSchema); static final String SCHEMA_FIELDS_REQUIRED_CONFIG; static final String SCHEMA_FIELDS_EXPECTED_CONFIG; }### Answer:
@Test(expected=Exception.class) public void testInitFailedOnUnfeasibleConfig() throws Exception { SubjectSchemas<BasicSchemaInfo> subjectSchemas = testSubject( new String[] {"a"}, new String[] {"a","b"}, new String[] {"b", "c"}, new String[] {"b", "e"} ); ExtendedSchemaRegistryClient schemaRegistryClient = Mockito.mock(ExtendedSchemaRegistryClient.class); Mockito. when(schemaRegistryClient.getSubjectSchemaInfos(Mockito.anyString())). thenReturn(subjectSchemas); Map<String, Object> config = new HashMap<>(); config.put(BySchemaFieldsVerifier.SCHEMA_FIELDS_REQUIRED_CONFIG, "a"); config.put(BySchemaFieldsVerifier.SCHEMA_FIELDS_EXPECTED_CONFIG, "c"); try (BySchemaFieldsVerifier verifier = new BySchemaFieldsVerifier()) { verifier.init("nomatter", schemaRegistryClient, config); } }
@Test(expected=Exception.class) public void testInitFailedOnMissingConfigArgument() throws Exception { Map<String, Object> config = null; ExtendedSchemaRegistryClient schemaRegistryClient = Mockito.mock(ExtendedSchemaRegistryClient.class); try (BySchemaFieldsVerifier verifier = new BySchemaFieldsVerifier()) { verifier.init("nomatter", schemaRegistryClient, config); } }
@Test(expected=Exception.class) public void testInitFailedOnInvalidRequiredFieldsArgument() throws Exception { Map<String, Object> config = new HashMap<>(); config.put(BySchemaFieldsVerifier.SCHEMA_FIELDS_REQUIRED_CONFIG, ""); ExtendedSchemaRegistryClient schemaRegistryClient = Mockito.mock(ExtendedSchemaRegistryClient.class); try (BySchemaFieldsVerifier verifier = new BySchemaFieldsVerifier()) { verifier.init("nomatter", schemaRegistryClient, config); } }