FileParser implements Closeable { public void registerRecordCallback(String recordName, RecordCallback callback) { List<RecordCallback> callbacks = recordCallbacks.get(recordName); if (!callbacks.contains(callback)) { recordCallbacks.put(recordName, callback); } } protected  FileParser();  FileParser(String configContent, String dataInputContent);  FileParser(File configFile, File dataInputFile);  FileParser(File configFile, String dataInputContent);  FileParser(String configContent, File dataInputFile); void registerRecordCallback(String recordName, RecordCallback callback); boolean removeRecordCallback(String recordName, RecordCallback callback); void registerExceptionCallback(ExceptionCallback callback); boolean removeExceptionCallback(ExceptionCallback callback); void open(); @Override void close(); void read();  }
@Test public void executeRecordCallback() { RecordCallback callback = mock(RecordCallback.class); MatchedRecord matchedRecord = mock(MatchedRecord.class); FileParser parser = new FileParser("", ""); parser.registerRecordCallback("test", callback); }