public void runAndAssert(Archive<?> deployment, boolean shouldBeFound)
{
WebArchive protocol = ShrinkWrap.create(WebArchive.class);
new BeansXMLProtocolProcessor().process(
new TestDeployment(deployment, new ArrayList<Archive<?>>()), protocol);
System.out.println(protocol.toString(true));
Assert.assertEquals(
"Verify beans.xml was " + (!shouldBeFound ? "not ":"") + "found",
shouldBeFound, protocol.contains("WEB-INF/beans.xml"));