assertEquals(Accepted.getInstance(), _client.delivery.getRemoteState());
LOGGER.fine(bold("======== About to accept and settle the message on the client"));
Delivery clientDelivery = _client.connection.getWorkHead();
assertEquals(_client.delivery, clientDelivery);
assertTrue(clientDelivery.isUpdated());
assertEquals(_client.sender, clientDelivery.getLink());
clientDelivery.disposition(clientDelivery.getRemoteState());
assertEquals(Accepted.getInstance(), _client.delivery.getLocalState());
clientDelivery.settle();
assertNull("Now we've settled, the delivery should no longer be in the work list", _client.connection.getWorkHead());
pumpClientToServer();
LOGGER.fine(bold("======== About to settle the message on the server"));
assertEquals(Accepted.getInstance(), _server.delivery.getRemoteState());
Delivery serverDelivery = _server.connection.getWorkHead();
assertEquals(_server.delivery, serverDelivery);
assertTrue(serverDelivery.isUpdated());
assertTrue("Client should have already settled", serverDelivery.remotelySettled());
serverDelivery.settle();
assertTrue(serverDelivery.isSettled());
assertNull("Now we've settled, the delivery should no longer be in the work list", _server.connection.getWorkHead());
// Increment the receiver's credit so its ready for another message.
// When using proton-c, this call is required in order to generate a Flow frame
// (proton-j sends one even without it to eagerly restore the session incoming window).