public void testRobustInvocationHandling() throws Exception {
setupGreeter();
control.setRobustInOnlyMode(true);
FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
.createFaultLocation();
location.setPhase(Phase.INVOKE);
location.setBefore(ServiceInvokerInterceptor.class.getName());
RMManager manager = greeterBus.getExtension(RMManager.class);
// the message is acked and the invocation takes place
greeter.greetMeOneWay("one");
Thread.sleep(6000L);
assertTrue("RetransmissionQueue must be empty", manager.getRetransmissionQueue().isEmpty());
control.setFaultLocation(location);
// the invocation fails but the message is acked because the delivery succeeds
greeter.greetMeOneWay("two");
Thread.sleep(6000L);
assertFalse("RetransmissionQueue must not be empty", manager.getRetransmissionQueue().isEmpty());
location.setPhase(null);
control.setFaultLocation(location);
// the retransmission succeeds and the invocation succeeds, the message is acked
Thread.sleep(6000L);
assertTrue("RetransmissionQueue must be empty", manager.getRetransmissionQueue().isEmpty());