### Question:
BBInputSetup implements JavaDelegate { protected void mapProject(List<AAIResultWrapper> projects, ServiceInstance serviceInstance) { if (!projects.isEmpty()) { AAIResultWrapper projectWrapper = projects.get(0); Optional<org.onap.aai.domain.yang.Project> aaiProjectOp = projectWrapper.asBean(org.onap.aai.domain.yang.Project.class); if (aaiProjectOp.isPresent()) { Project project = this.mapperLayer.mapAAIProject(aaiProjectOp.get()); serviceInstance.setProject(project); } } }  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 testMapProject() throws JsonProcessingException { org.onap.aai.domain.yang.Project expectedAAI = new org.onap.aai.domain.yang.Project(); Project expected = new Project(); AAIResultWrapper vnfWrapper = new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI)); doReturn(expected).when(bbInputSetupMapperLayer).mapAAIProject(isA(org.onap.aai.domain.yang.Project.class)); ServiceInstance serviceInstance = new ServiceInstance(); SPY_bbInputSetup.mapProject(Arrays.asList(new AAIResultWrapper[] {vnfWrapper}), serviceInstance); assertEquals(expected, serviceInstance.getProject()); }