### Question:
HeatBridgeImpl implements HeatBridgeApi { @Override public List<String> extractStackResourceIdsByResourceType(final List<Resource> stackResources, final String resourceType) { return stackResources.stream().filter(stackResource -> stackResource.getType().equals(resourceType)) .map(Resource::getPhysicalResourceId).collect(Collectors.toList()); } HeatBridgeImpl(AAIResourcesClient resourcesClient, final CloudIdentity cloudIdentity,
            @Nonnull final String cloudOwner, @Nonnull final String cloudRegionId, @Nonnull final String regionId,
            @Nonnull final String tenantId, @Nonnull final NodeType nodeType);  HeatBridgeImpl(); @Override OpenstackClient authenticate(); @Override List<Resource> queryNestedHeatStackResources(final String heatStackId); @Override List<String> extractStackResourceIdsByResourceType(final List<Resource> stackResources,
            final String resourceType); @Override List<String> extractNetworkIds(final List<String> networkNameList); @Override List<Server> getAllOpenstackServers(final List<Resource> stackResources); @Override List<Network> getAllOpenstackProviderNetworks(final List<Resource> stackResources); @Override List<org.openstack4j.model.compute.Image> extractOpenstackImagesFromServers(final List<Server> servers); @Override List<org.openstack4j.model.compute.Flavor> extractOpenstackFlavorsFromServers(final List<Server> servers); void buildAddNetworksToAaiAction(final String genericVnfId, final String vfModuleId,
            List<Network> networks); @Override void buildAddImagesToAaiAction(final List<org.openstack4j.model.compute.Image> images); @Override void buildAddFlavorsToAaiAction(final List<org.openstack4j.model.compute.Flavor> flavors); @Override void buildAddVserversToAaiAction(final String genericVnfId, final String vfModuleId,
            final List<Server> servers); @Override void buildAddVserverLInterfacesToAaiAction(final List<Resource> stackResources,
            final List<String> oobMgtNetIds, String cloudOwner); @Override void createPserversAndPinterfacesIfNotPresentInAai(final List<Resource> stackResources); @Override void submitToAai(boolean dryrun); @Override void deleteVfModuleData(@Nonnull final String vnfId, @Nonnull final String vfModuleId);  }### Answer:
@Test public void testExtractStackResourceIdsByResourceType() throws HeatBridgeException { List<Resource> expectedResourceList = (List<Resource>) extractTestStackResources(); List<String> expectedServerIds = Arrays.asList("43c2159b-2c04-46ac-bda5-594110cae2d3", "7cff109a-b2b7-4933-97b4-ec44a8365568"); List<String> serverIds = heatbridge.extractStackResourceIdsByResourceType(expectedResourceList, HeatBridgeConstants.OS_SERVER_RESOURCE_TYPE); assertEquals(expectedServerIds, serverIds); }