### Question:
BBInputSetup implements JavaDelegate { protected Vnfc getVnfcToConfiguration(String vnfcName) { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfcName)); Optional<org.onap.aai.domain.yang.Vnfc> vnfcOp = bbInputSetupUtils.getAAIResourceDepthOne(uri).asBean(org.onap.aai.domain.yang.Vnfc.class); if (vnfcOp.isPresent()) { org.onap.aai.domain.yang.Vnfc vnfcAAI = vnfcOp.get(); return this.mapperLayer.mapAAIVnfc(vnfcAAI); } 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 testGettingVnfcToConfiguration() throws Exception { String vnfcName = "vnfcName"; org.onap.aai.domain.yang.Configuration expectedAAI = new org.onap.aai.domain.yang.Configuration(); AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfcName)); AAIResultWrapper configurationWrapper = new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI)); doReturn(new AAIResultWrapper(null)).when(SPY_bbInputSetupUtils).getAAIResourceDepthOne(aaiResourceUri); Vnfc vnfc = SPY_bbInputSetup.getVnfcToConfiguration(vnfcName); Assert.assertNull(vnfc); doReturn(configurationWrapper).when(SPY_bbInputSetupUtils).getAAIResourceDepthOne(aaiResourceUri); vnfc = SPY_bbInputSetup.getVnfcToConfiguration(vnfcName); Assert.assertNotNull(vnfc); }