@Test public void receive() throws IOException { Concept concept1 = Concept.newBuilder().setId("ID_1").setLabel("LABEL_1").setParams(Collections.emptyList()).build(); Concept concept2 = Concept.newBuilder().setId("ID_2").setLabel("LABEL_2").setParams(Collections.emptyList()).build(); recordReceiver.receive(concept1); recordReceiver.receive(concept2); verify(dataFileWriter).append(concept1); verify(dataFileWriter).append(concept2); assertEquals(2L, recordReceiver.getReceivedCount()); }
@Override public void receive(T record) throws IOException { super.receive(record); ++receivedCount; }
DataFileRecordReceiverWithCounter extends DataFileRecordReceiver<T> { @Override public void receive(T record) throws IOException { super.receive(record); ++receivedCount; } }
DataFileRecordReceiverWithCounter extends DataFileRecordReceiver<T> { @Override public void receive(T record) throws IOException { super.receive(record); ++receivedCount; } DataFileRecordReceiverWithCounter(DataFileWriter<T> writer); }
DataFileRecordReceiverWithCounter extends DataFileRecordReceiver<T> { @Override public void receive(T record) throws IOException { super.receive(record); ++receivedCount; } DataFileRecordReceiverWithCounter(DataFileWriter<T> writer); long getReceivedCount(); @Override void receive(T record); }
DataFileRecordReceiverWithCounter extends DataFileRecordReceiver<T> { @Override public void receive(T record) throws IOException { super.receive(record); ++receivedCount; } DataFileRecordReceiverWithCounter(DataFileWriter<T> writer); long getReceivedCount(); @Override void receive(T record);  }