@Test
public void testOrderBeforeAndAfterException() throws Exception {

	List<WebXMLDefinition> webXMLDefinitions = new ArrayList<>();
	webXMLDefinitions.add(
		loadWebXMLDefinition("dependencies/custom-web-fragment-5.xml"));
	WebXMLDefinition webXMLDefinition = loadWebXMLDefinition(
		"dependencies/custom-web.xml");
	boolean threwOrderBeforeAndAfterException = false;
	try {
		OrderUtil.getOrderedWebXMLDefinitions(
			webXMLDefinitions, webXMLDefinition.getAbsoluteOrderingNames());
	}
	catch (Exception exception) {
		if (exception instanceof OrderBeforeAndAfterException) {
			threwOrderBeforeAndAfterException = true;
		}
	}
	Assert.assertTrue(threwOrderBeforeAndAfterException);
}