- @Ignore
- @Test
- public void incorrectTopLevelElementTest() {
-
- boolean nullPointerExceptionRaised = false;
- try {
- TestUtils.writeCompNodeWithSchemaContextToOutput(prepareCompositeNode(),
- (Set<Module>) Collections.EMPTY_SET, prepareDataSchemaNode(), StructuredDataToXmlProvider.INSTANCE);
- } catch (WebApplicationException | IOException e) {
- LOG.error("WebApplicationException or IOException was raised");
- } catch (NullPointerException e) {
- nullPointerExceptionRaised = true;
- }
- assertTrue(nullPointerExceptionRaised);
-
- }
-
- private CompositeNode prepareCompositeNode() {
- MutableCompositeNode cont = NodeFactory.createMutableCompositeNode(
- TestUtils.buildQName("cont", "simple:uri", "2012-12-17"), null, null, ModifyAction.CREATE, null);
- MutableSimpleNode<?> lf1 = NodeFactory.createMutableSimpleNode(
- TestUtils.buildQName("lf1", "simple:uri", "2012-12-17"), cont, "any value", ModifyAction.CREATE, null);
- cont.getChildren().add(lf1);
- cont.init();
- return cont;
- }