WorkflowBundleIO { public void setReaders(List<WorkflowBundleReader> readers) { this.readers = readers; }  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 setReaders() { WorkflowBundleReader myReader = new WorkflowBundleReader() { @Override public Set<String> getMediaTypes() { return Collections.singleton("application/vnd.example.myOwn"); } @Override public WorkflowBundle readBundle(File bundleFile, String mediaType) { return null; } @Override public WorkflowBundle readBundle(InputStream inputStream, String mediaType) { return null; } @Override public String guessMediaTypeForSignature(byte[] firstBytes) { return "test/test"; } }; bundleIO.setReaders(Collections.singletonList(myReader)); assertEquals(1, bundleIO.getReaders().size()); assertSame(myReader, bundleIO.getReaders().get(0)); assertSame(myReader, bundleIO.getReaderForMediaType("application/vnd.example.myOwn")); assertNull(bundleIO .getReaderForMediaType(TEXT_VND_TAVERNA_SCUFL2_STRUCTURE)); assertEquals("test/test", bundleIO.guessMediaTypeForSignature(new byte[4])); }