@Test
public void testReadFeaturesThroughCallback() throws
                                              Exception {

    // given a WKT file to read
    final String wkt = getFixture("features.wkt");
    // when parsing this file as WKT
    new WKTReader().readFeatures(new StringReader(wkt),
                                 onWKTReaderListener);
    // then
    verify(onWKTReaderListener,
           never()).onError(any(Throwable.class));
    verify(onWKTReaderListener,
           times(3)).onProgress(anyInt(),
                                any(Feature.class));
    verify(onWKTReaderListener).onFinish(featureCollectionArgumentCaptor.capture());
    final FeatureCollection featureCollection = featureCollectionArgumentCaptor.getValue();
    assertNotNull(featureCollection);
    assertEquals(3,
                 featureCollection.getFeatures()
                                  .size());
    assertNotNull(featureCollection.getFeature("69"));
    assertNotNull(featureCollection.getFeature("19"));
    assertNotNull(featureCollection.getFeature("146"));
}