### Question:
BBInputSetup implements JavaDelegate { protected void mapPlatform(List<AAIResultWrapper> platforms, GenericVnf genericVnf) { if (!platforms.isEmpty()) { AAIResultWrapper platformWrapper = platforms.get(0); Optional<org.onap.aai.domain.yang.Platform> aaiPlatformOp = platformWrapper.asBean(org.onap.aai.domain.yang.Platform.class); if (aaiPlatformOp.isPresent()) { Platform platform = this.mapperLayer.mapAAIPlatform(aaiPlatformOp.get()); genericVnf.setPlatform(platform); } } }  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 testMapPlatform() throws JsonProcessingException { org.onap.aai.domain.yang.Platform expectedAAI = new org.onap.aai.domain.yang.Platform(); Platform expected = new Platform(); AAIResultWrapper vnfWrapper = new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI)); doReturn(expected).when(bbInputSetupMapperLayer).mapAAIPlatform(isA(org.onap.aai.domain.yang.Platform.class)); GenericVnf vnf = new GenericVnf(); SPY_bbInputSetup.mapPlatform(Arrays.asList(new AAIResultWrapper[] {vnfWrapper}), vnf); assertEquals(expected, vnf.getPlatform()); }