class VrfValidation {

    protected void aaiRouteTargetValidation(L3Network aaiLocalNetwork) throws VrfBondingServiceException {
        AAIResultWrapper networkWrapper = new AAIResultWrapper(aaiLocalNetwork);
        if (networkWrapper.getRelationships().isPresent()) {
            List<AAIResourceUri> vpnBindingUris =
                    networkWrapper.getRelationships().get().getRelatedUris(Types.VPN_BINDING);
            if (!vpnBindingUris.isEmpty()) {
                Optional<org.onap.aai.domain.yang.VpnBinding> vpnBindingOp =
                        bbInputSetupUtils.getAAIResourceDepthOne(vpnBindingUris.get(0))
                                .asBean(org.onap.aai.domain.yang.VpnBinding.class);
                if (vpnBindingOp.isPresent()) {
                    org.onap.aai.domain.yang.VpnBinding vpnBinding = vpnBindingOp.get();
                    if (vpnBinding.getRouteTargets() != null
                            && !vpnBinding.getRouteTargets().getRouteTarget().isEmpty()) {
                        return;
                    }
                }
            }
        }
        throw new VrfBondingServiceException("The Local Network: " + aaiLocalNetwork.getNetworkId()
                + " does not have vpn binding and/or RT information");
    }

}