@Test
public void testBasicMaxItems2() throws Exception {

	SwitchCounter sc = new SwitchCounter();
	pipe.setSender(getElementRenderer());
	pipe.setMaxItems(2);
	configurePipe();
	pipe.start();
	ByteArrayInputStream bais = new ByteArrayInputStream(messageBasicNoNSLong.getBytes());
	PipeRunResult prr = doPipe(pipe, new LoggingInputStream(bais, sc), session);
	String actual = Message.asString(prr.getResult());
	assertEquals(expectedBasicNoNSFirstTwoElements, actual);
	// System.out.println("num reads="+sc.hitCount.get("in"));
	assertThat(sc.hitCount.get("in"), Matchers.lessThan(15));
}