I have two lists `List<Product> products` and `List<AssetMap> mapAssetIds`. Both the `Product` and `AssetMap` classes have two fields `productId` and `assetId`.

```
public class Product {
    public String productId;
    public String assetId;
}

public class AssetMap {
    public String productId;
    public String assetId;
}

List<Product> products = new ArrayList<>();
products.add(new Product("pid1", "aid1"));
products.add(new Product("pid2", "aid2"));
List<AssetMap> assetMaps = new ArrayList<>();
assetMaps.add(new AssetMap("pid560", "aid1"));
assetMaps.add(new AssetMap("pid3", "aid3"));

```

The output should be:

```
["pid560", "aid2"]

```

I want to check if the `assetId`s in `products` are present in `assetId`s in `mapAssetIds`.

If they are, then take the `productId` from `mapAssetIds` else take the `assetId` from `Product` and put them in a `List<String>`.

How do I do this using Java Stream?