@SuppressWarnings("unchecked") @Test public void testOnDataChangeContract() { ArgumentCaptor<SecurityRuleGroups> captor = ArgumentCaptor.forClass(SecurityRuleGroups.class); doNothing().when(mockUlnDatastoreUtil).submitSecurityGroupsToDs(captor.capture()); Uuid expectedFaasSecId = new Uuid("c4511aac-ae43-11e5-bf7f-feff819cdc9f"); contractManagerListener.setExpectedFaasSecId(expectedFaasSecId); Contract testContract = makeTestContract(); contractManagerListener.setExpectedContract(testContract); DataTreeModification<Contract> mockDataTreeModification = mock(DataTreeModification.class); DataObjectModification<Contract> mockModification = mock(DataObjectModification.class); doReturn(mockModification).when(mockDataTreeModification).getRootNode(); doReturn(DataObjectModification.ModificationType.WRITE).when(mockModification).getModificationType(); doReturn(testContract).when(mockModification).getDataAfter(); contractManagerListener.onDataTreeChanged(Collections.singletonList(mockDataTreeModification)); assertTrue("testOnDataChangeContract: Actual Faas Security Id is NOT as expected", expectedFaasSecId.equals(captor.getValue().getUuid())); }
@Override public void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes) { executor.execute(() -> executeEvent(changes)); }
FaasContractManagerListener implements DataTreeChangeListener<Contract> { @Override public void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes) { executor.execute(() -> executeEvent(changes)); } }
FaasContractManagerListener implements DataTreeChangeListener<Contract> { @Override public void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes) { executor.execute(() -> executeEvent(changes)); } FaasContractManagerListener(DataBroker dataProvider, TenantId gbpTenantId, Uuid faasTenantId,
            Executor executor, UlnDatastoreUtil ulnDatastoreUtil); }
FaasContractManagerListener implements DataTreeChangeListener<Contract> { @Override public void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes) { executor.execute(() -> executeEvent(changes)); } FaasContractManagerListener(DataBroker dataProvider, TenantId gbpTenantId, Uuid faasTenantId,
            Executor executor, UlnDatastoreUtil ulnDatastoreUtil); @Override void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes); void loadAll(List<Contract> contracts, List<MappedContract> mpContracts); }
FaasContractManagerListener implements DataTreeChangeListener<Contract> { @Override public void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes) { executor.execute(() -> executeEvent(changes)); } FaasContractManagerListener(DataBroker dataProvider, TenantId gbpTenantId, Uuid faasTenantId,
            Executor executor, UlnDatastoreUtil ulnDatastoreUtil); @Override void onDataTreeChanged(Collection<DataTreeModification<Contract>> changes); void loadAll(List<Contract> contracts, List<MappedContract> mpContracts);  }