### Question:
BBInputSetup implements JavaDelegate { protected ServiceSubscription getServiceSubscription(RequestDetails requestDetails, Customer customer) { org.onap.aai.domain.yang.ServiceSubscription aaiServiceSubscription = bbInputSetupUtils.getAAIServiceSubscription(customer.getGlobalCustomerId(), requestDetails.getRequestParameters().getSubscriptionServiceType()); if (aaiServiceSubscription != null) { return mapperLayer.mapAAIServiceSubscription(aaiServiceSubscription); } else { return null; } }  BBInputSetupUtils getBbInputSetupUtils(); void setCloudInfoFromAAI(CloudInfoFromAAI cloudInfoFromAAI); void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils); BBInputSetupMapperLayer getMapperLayer(); void setMapperLayer(BBInputSetupMapperLayer mapperLayer); @Override void execute(DelegateExecution execution); ServiceInstance getExistingServiceInstance(org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI);  }### Answer:
@Test public void testGetServiceSubscription() throws IOException { ServiceSubscription expected = new ServiceSubscription(); RequestDetails requestDetails = new RequestDetails(); RequestParameters params = new RequestParameters(); params.setSubscriptionServiceType("subscriptionServiceType"); requestDetails.setRequestParameters(params); org.onap.aai.domain.yang.ServiceSubscription aaiServiceSubscription = new org.onap.aai.domain.yang.ServiceSubscription(); Customer customer = new Customer(); customer.setGlobalCustomerId("globalCustomerId"); doReturn(aaiServiceSubscription).when(SPY_bbInputSetupUtils).getAAIServiceSubscription( customer.getGlobalCustomerId(), requestDetails.getRequestParameters().getSubscriptionServiceType()); doReturn(expected).when(bbInputSetupMapperLayer).mapAAIServiceSubscription(aaiServiceSubscription); ServiceSubscription actual = SPY_bbInputSetup.getServiceSubscription(requestDetails, customer); assertThat(actual, sameBeanAs(expected)); }