@Test public void basicTest() throws Exception { final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> emptyImpls = new HashMap<>(); final List<YangInstanceIdentifier> addList1 = new ArrayList<>(); final List<YangInstanceIdentifier> addList2 = new ArrayList<>(); final DOMRpcImplementation testClass = getTestRpcImplementation(); final UnknownDOMRpcRoutingTableEntry test = new UnknownDOMRpcRoutingTableEntry(TestModel.TEST_QNAME, emptyImpls); TEST_LIST.add(testClass); emptyImpls.put(YangInstanceIdentifier.empty(), TEST_LIST); assertNotNull(test); assertNotNull(test.newInstance(emptyImpls)); assertNotNull(OperationInvocation.invoke(test, TEST_CONTAINER)); assertNotNull(test.getImplementations()); assertEquals(test.getImplementations(YangInstanceIdentifier.empty()), TEST_LIST); assertTrue(test.containsContext(YangInstanceIdentifier.empty())); assertTrue(test.registeredIdentifiers().contains(YangInstanceIdentifier.empty())); addList1.add(YangInstanceIdentifier.empty()); addList1.add(YangInstanceIdentifier.of(TestModel.TEST_QNAME)); addList2.add(YangInstanceIdentifier.of(TestModel.TEST2_QNAME)); final AbstractDOMRpcRoutingTableEntry tst = (AbstractDOMRpcRoutingTableEntry) test.add(testClass, addList1); final AbstractDOMRpcRoutingTableEntry tst1 = (AbstractDOMRpcRoutingTableEntry) tst.add(testClass, addList2); final AbstractDOMRpcRoutingTableEntry tst2 = (AbstractDOMRpcRoutingTableEntry) tst1.remove(testClass, addList1); assertEquals(1, test.getImplementations().size()); assertEquals(2, tst.getImplementations().size()); assertEquals(3, tst1.getImplementations().size()); assertNotNull(tst2.getImplementations()); assertEquals(2, tst2.getImplementations().size()); }
@Override protected UnknownDOMRpcRoutingTableEntry newInstance( final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) { return new UnknownDOMRpcRoutingTableEntry(getType(), impls); }
UnknownDOMRpcRoutingTableEntry extends AbstractDOMRpcRoutingTableEntry { @Override protected UnknownDOMRpcRoutingTableEntry newInstance( final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) { return new UnknownDOMRpcRoutingTableEntry(getType(), impls); } }
UnknownDOMRpcRoutingTableEntry extends AbstractDOMRpcRoutingTableEntry { @Override protected UnknownDOMRpcRoutingTableEntry newInstance( final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) { return new UnknownDOMRpcRoutingTableEntry(getType(), impls); } UnknownDOMRpcRoutingTableEntry(final QName type,
            final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls); }
UnknownDOMRpcRoutingTableEntry extends AbstractDOMRpcRoutingTableEntry { @Override protected UnknownDOMRpcRoutingTableEntry newInstance( final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) { return new UnknownDOMRpcRoutingTableEntry(getType(), impls); } UnknownDOMRpcRoutingTableEntry(final QName type,
            final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls);  }
UnknownDOMRpcRoutingTableEntry extends AbstractDOMRpcRoutingTableEntry { @Override protected UnknownDOMRpcRoutingTableEntry newInstance( final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) { return new UnknownDOMRpcRoutingTableEntry(getType(), impls); } UnknownDOMRpcRoutingTableEntry(final QName type,
            final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls);   }