@Test
public void testHandleDeliveryWithDeserializationError() throws Exception {

	RoboconfMessageQueue messageQueue = new RoboconfMessageQueue();
	Channel channel = Mockito.mock( Channel.class );
	RoboconfConsumer rc = new RoboconfConsumer( "DM", channel, messageQueue );
	final StringHandler logHandler = new StringHandler();
	Logger logger = TestUtils.getInternalField( rc, "logger", Logger.class );
	logger.setUseParentHandlers( false );
	logger.addHandler( logHandler );
	rc.handleDelivery( "tag", Mockito.mock( Envelope.class ), null, new byte[ 1 ]);
	Assert.assertTrue( logHandler.getLogs().startsWith( "DM: a message could not be deserialized." ));
}