title: Removing based on null values inside a optional map object in java 8
body: <p>Requesting your support to show some light on the below filter condition, we have an object as below, not detailing full object</p>
  <pre><code>Class Test {
  ... so many properties and one properties is an map
   private final Map&lt;String, TestAttributes&gt; testAttributes
  ....
  
  # and in get, returning optional map
  
  public Optional&lt;Map&lt;String, TestAttributes&gt;&gt; getTestAttributes(){
   return Optional.ofNullable(this.testAttributes)
  }
  }
  </code></pre>
  <p>The TestAttributes is an interface and as below</p>
  <pre><code>public interface TestAttributes{
    AttributeValue getValue();
  }
  </code></pre>
  <p>AttributeValue is an abstract class which returns value</p>
  <pre><code>public abstract class AttributeValue&lt;V&gt;{
    private final V value;
  
  public AttributeVale(V value){ this.vale = value;}
  </code></pre>
  <p>I have to filter out the testAttributes which have values set as null or empty string. Not getting an idea on how to do it,</p>
  <pre><code>Test testwithValues = .....getting Testobject
  testwithValues.getTestAttributes(...... this part -- not sure how to filter out the attributes whose attribute value is null)
  </code></pre>
  <p>Would be great if I can get some directions, thanks</p>
  <p>Regards
  Haru</p>