title: How to rewrite Modelmapper Converter as Lambda Expression (java 1.8)?
body: <p>I use <strong>ModelMapper 2.1.0</strong> and there is an Interface called <strong>Converter</strong></p>
  
  <p>I'm using this Converter(modelmapper) like this :</p>
  
  <pre><code>import org.modelmapper.Converter;
  
  public class MyClass {
      private ModelMaper myMapper = new ModelMapper();      
      Converter&lt;Instant, java.util.Date&gt; myDateConverter;
  
      @Before 
      public void setup() {
          myDateConverter = new Converter&lt;Instant, java.util.Date&gt;() {
  
          @Override
          public java.util.Date convert(MappingContext&lt;Instant, java.util.Date&gt; mappingContext) {
                  return java.util.Date.from(mappingContext.getSource());
              }
         }
      }
  
      @Test
      public void fromDto() {
          myMapper.addConverter(myDateConverter);
          ....
          assertThat(domain.getDate()).isEqualTo(dto.getDate())
      }
  }
  </code></pre>
  
  <p>Now i just want to rewrite the anonymous inner class with lambda like this :</p>
  
  <pre><code>myDateConverter = mappingContext -&gt; java.util.Date.from(mappingContext.getSource());
  </code></pre>
  
  <p>But when I'm testing (JUnit) the converter return <code>null</code> when it's the lambda expression.</p>
  
  <p>How to rewrite this anonymous inner class to a lambda expression, which actually really convert?</p>