### Question:
RmiTransport extends Transport { @Override public void openFile(String repositoryHash, String filename, Date currentDate) throws JournalException { try { super.testStateChange(State.FILE_OPEN); writer = new RmiTransportWriter(receiver, repositoryHash, filename); xmlWriter = new IndentingXMLEventWriter(XMLOutputFactory .newInstance() .createXMLEventWriter(new BufferedWriter(writer, bufferSize))); parent.writeDocumentHeader(xmlWriter, repositoryHash, currentDate); super.setState(State.FILE_OPEN); } catch (XMLStreamException e) { throw new JournalException(e); } catch (FactoryConfigurationError e) { throw new JournalException(e); } } RmiTransport(Map<String, String> parameters,
                        boolean crucial,
                        TransportParent parent); protected  RmiTransport(Map<String, String> parameters,
                           boolean crucial,
                           TransportParent parent,
                           RmiJournalReceiverInterface rx); @Override void openFile(String repositoryHash,
                         String filename,
                         Date currentDate); @Override XMLEventWriter getWriter(); @Override void closeFile(); @Override void shutdown(); static final String PARAMETER_HOST_NAME; static final String PARAMETER_PORT_NUMBER; static final String PARAMETER_SERVICE_NAME; static final String PARAMETER_BUFFER_SIZE; static final int DEFAULT_PORT_NUMBER; static final int DEFAULT_BUFFER_SIZE; }### Answer:
@Ignore @Test(expected = JournalException.class) public void testReceiverThrowsException() throws IOException, JournalException { startMockRmiJournalReceiver(true); RmiTransport transport = new RmiTransport(parameters, CRUCIAL, parent); transport.openFile("someHash", "aFileName", new Date()); fail("Expected an exception."); }