WorkflowBundleIO { public void setWriters(List<WorkflowBundleWriter> writers) { this.writers = writers; }  WorkflowBundleReader getReaderForMediaType(String mediaType); List<WorkflowBundleReader> getReaders(); Set<String> getSupportedReaderMediaTypes(); Set<String> getSupportedWriterMediaTypes(); WorkflowBundleWriter getWriterForMediaType(String mediaType); List<WorkflowBundleWriter> getWriters(); String guessMediaTypeForSignature(byte[] firstBytes); WorkflowBundle readBundle(File bundleFile, String mediaType); WorkflowBundle readBundle(InputStream inputStream, String mediaType); WorkflowBundle readBundle(URL url, String mediaType); void setReaders(List<WorkflowBundleReader> readers); void setWriters(List<WorkflowBundleWriter> writers); void writeBundle(WorkflowBundle wfBundle, File destination,
			String mediaType); void writeBundle(WorkflowBundle wfBundle, OutputStream output,
			String mediaType); WorkflowBundle createBundle();  }
@Test public void setWriters() { WorkflowBundleWriter myWriter = new WorkflowBundleWriter() { @Override public Set<String> getMediaTypes() { return Collections.singleton("application/vnd.example.myOwn"); } @Override public void writeBundle(WorkflowBundle wfBundle, File destination, String mediaType) { } @Override public void writeBundle(WorkflowBundle wfBundle, OutputStream output, String mediaType) { } }; bundleIO.setWriters(Collections.singletonList(myWriter)); assertEquals(1, bundleIO.getWriters().size()); assertSame(myWriter, bundleIO.getWriters().get(0)); assertSame(myWriter, bundleIO.getWriterForMediaType("application/vnd.example.myOwn")); assertNull(bundleIO .getWriterForMediaType(TEXT_VND_TAVERNA_SCUFL2_STRUCTURE)); }