VpnintentProvider implements VpnintentService, BindingAwareProvider, AutoCloseable { @Override public void onSessionInitiated(ProviderContext session) { LOG.info("VpnintentProvider Session Initiated"); dataBroker = session.getSALService(DataBroker.class); rpcRegistration = session.addRpcImplementation(VpnintentService.class, this); this.mdsal = new MdsalUtils(this.dataBroker); loadIntentMappingServiceReference(); Vpns vpns = new VpnsBuilder().build(); MplsLabels labels = new MplsLabelsBuilder().build(); initDatastore(LogicalDatastoreType.CONFIGURATION, VPN_IID, vpns); initDatastore(LogicalDatastoreType.OPERATIONAL, LABELS_IID, labels); }  @Override void onSessionInitiated(ProviderContext session); @Override void close(); @Override Future<RpcResult<Void>> removeVpn(RemoveVpnInput input); @Override Future<RpcResult<Void>> addVpnEndpoint(AddVpnEndpointInput input); @Override Future<RpcResult<Void>> removeVpnEndpoint(RemoveVpnEndpointInput input); static final InstanceIdentifier<MplsLabels> LABELS_IID; static final InstanceIdentifier<Vpns> VPN_IID; static final InstanceIdentifier<VpnIntents> VPN_INTENT_IID; static final InstanceIdentifier<Endpoint> ENDPOINT_IID; }
@Ignore @Test public void testOnSessionInitiated() { VpnintentProvider provider = new VpnintentProvider(); provider.onSessionInitiated(mock(BindingAwareBroker.ProviderContext.class)); }