### Question:
TesseractProcess extends AbstractProcess implements
		OcrProcess { @Override public void addOutput(OcrFormat format) { if (!formats.keySet().contains(format)) { throw new IllegalArgumentException("Format is not supported by tesseract: " + format); } OcrOutput output = new AbstractOutput() {}; output.setLocalUri(constructLocalUri(format)); output.setFormat(format); ocrOutputs.add(output); }  @Override void addImage(URI localUri); @Override void addOutput(OcrFormat format); void start();  }### Answer:
@Test public void shouldAddOneOutput() throws Exception { assertEquals("Number of outputs", 0, processSpy.getAllOutputFormats().size()); processSpy.addOutput(OcrFormat.HOCR); assertEquals("Number of outputs", 1, processSpy.getAllOutputFormats().size()); }
@Test(expected=IllegalArgumentException.class) public void shouldRejectUnsupportedFormatForOutput() throws Exception { processSpy.addOutput(OcrFormat.PDF); }