Gpx11Provider implements ReaderProvider, WriterProvider { @Override public Writer newWriter(final Formats format) { return Formats.GPX_1_1 == format ? new Gpx11Writer() : null; } Gpx11Provider(); @Override Reader newReader(final Formats format); @Override Writer newWriter(final Formats format);  }
@Test public void wrongWriterFormat() { final Writer writer = new Gpx11Provider().newWriter(Formats.KML_2_1_0); assertNull(writer); }
@Test public void gpx11Writer() { final Writer writer = new Gpx11Provider().newWriter(Formats.GPX_1_1); assertNotNull(writer); }