@Test
public void testWiretap() {

	TestTransportConfig config = new TestTransportConfig(Collections.emptyMap());
	TestTransport transport = new TestTransport(config);
	doTestWiretap(transport.wiretap(true), LogLevel.DEBUG, ByteBufFormat.HEX_DUMP);
	doTestWiretap(transport.wiretap("category"), LogLevel.DEBUG, ByteBufFormat.HEX_DUMP);
	doTestWiretap(transport.wiretap("category", LogLevel.DEBUG), LogLevel.DEBUG, ByteBufFormat.HEX_DUMP);
	doTestWiretap(transport.wiretap("category", LogLevel.INFO), LogLevel.INFO, ByteBufFormat.HEX_DUMP);
	doTestWiretap(
		transport.wiretap("category", LogLevel.INFO, AdvancedByteBufFormat.HEX_DUMP),
		LogLevel.INFO,
		ByteBufFormat.HEX_DUMP);
	doTestWiretap(
		transport.wiretap("category", LogLevel.DEBUG, AdvancedByteBufFormat.SIMPLE),
		LogLevel.DEBUG,
		ByteBufFormat.SIMPLE);
	doTestWiretapForTextualLogger(
		transport.wiretap("category", LogLevel.DEBUG, AdvancedByteBufFormat.TEXTUAL), LogLevel.DEBUG);
	doTestWiretapForTextualLogger(
		transport.wiretap("category", LogLevel.DEBUG, AdvancedByteBufFormat.TEXTUAL, Charset.defaultCharset()), LogLevel.DEBUG);
}