Gpx11Provider implements ReaderProvider, WriterProvider { @Override public Reader newReader(final Formats format) { return Formats.GPX_1_1 == format ? new GpxReader(Version.V11) : null; } Gpx11Provider(); @Override Reader newReader(final Formats format); @Override Writer newWriter(final Formats format);  }
@Test public void wrongReaderFormat() { final Reader reader = new Gpx11Provider().newReader(Formats.KML_2_1_0); assertNull(reader); }
@Test public void gpx11Reader() { final Reader reader = new Gpx11Provider().newReader(Formats.GPX_1_1); assertNotNull(reader); }