class BBInputSetup implements JavaDelegate {

    protected void mapOwningEntity(List<AAIResultWrapper> owningEntities, ServiceInstance serviceInstance) {
        if (!owningEntities.isEmpty()) {
            AAIResultWrapper owningEntityWrapper = owningEntities.get(0);
            Optional<org.onap.aai.domain.yang.OwningEntity> aaiOwningEntityOp =
                    owningEntityWrapper.asBean(org.onap.aai.domain.yang.OwningEntity.class);
            if (aaiOwningEntityOp.isPresent()) {
                OwningEntity owningEntity = this.mapperLayer.mapAAIOwningEntity(aaiOwningEntityOp.get());
                serviceInstance.setOwningEntity(owningEntity);
            }
        }
    }

}