### Question:
RMOutInterceptor extends AbstractRMInterceptor<Message> { boolean isRuntimeFault(Message message) { FaultMode mode = MessageUtils.getFaultMode(message); if (null == mode) { return false; } return FaultMode.CHECKED_APPLICATION_FAULT != mode; } RMOutInterceptor();   }### Answer:
@Test public void testIsRuntimeFault() { Message message = control.createMock(Message.class); Exchange exchange = control.createMock(Exchange.class); EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes(); EasyMock.expect(exchange.getOutFaultMessage()).andReturn(message).anyTimes(); EasyMock.expect(message.get(FaultMode.class)).andReturn(FaultMode.RUNTIME_FAULT).anyTimes(); control.replay(); RMOutInterceptor rmi = new RMOutInterceptor(); assertTrue(rmi.isRuntimeFault(message)); control.verify(); control.reset(); EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes(); EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes(); control.replay(); assertFalse(rmi.isRuntimeFault(message)); control.verify(); }
@Test public void testIsRuntimeFault() { Message message = control.createMock(Message.class); Exchange exchange = control.createMock(Exchange.class); EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes(); EasyMock.expect(exchange.getOutFaultMessage()).andReturn(message).anyTimes(); EasyMock.expect(message.get(FaultMode.class)).andReturn(FaultMode.RUNTIME_FAULT).anyTimes(); control.replay(); RMOutInterceptor rmi = new RMOutInterceptor(); assertTrue(rmi.isRuntimeFault(message)); control.verify(); control.reset(); EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes(); EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes(); control.replay(); assertTrue(!rmi.isRuntimeFault(message)); control.verify(); }