@Test
void load() throws DocumentParseException {

    Document realDocument = DocumentTools.INSTANCE.getDocumentBuilder().newDocument();
    Document mockDocument = mock(Document.class);
    when(mockDocument.getElementsByTagName(eq(ITEM))).thenReturn(new NodeList() {
        private List<Element> elements = Stream.of(
                TestUtils.createJdbcXml(realDocument),
                TestUtils.createCassandraXml(realDocument, true, true),
                TestUtils.createUnsupportedElement(realDocument)
        ).collect(toList());
        @Override
        public Node item(int index) {
            return elements.get(index);
        }
        @Override
        public int getLength() {
            return elements.size();
        }
    });
    when(documentTools.parse(any(File.class))).thenReturn(mockDocument);
    EntityBundleLoader loader = new EntityBundleLoader(documentTools, registry, JsonFileUtils.INSTANCE);
    final Bundle bundle = loader.load(mock(File.class), BundleLoadingOperation.EXPORT);
    assertNotNull(bundle);
    assertFalse(bundle.getCassandraConnections().isEmpty());
    assertFalse(bundle.getJdbcConnections().isEmpty());
    assertEquals(1, bundle.getCassandraConnections().size());
    assertEquals(1, bundle.getJdbcConnections().size());
}