title: assertEquals between objects of inconvertible String and Optional<String> JUnit test
body: <p>I am trying to test a Java 8 optional but when I hover over the <code>assertEquals</code> it says <code>Equals between objects of inconvertible String and Optional&lt;String&gt;</code></p>
  
  <pre><code>@Test
      @Sql({"applicant.sql"})
      public void findbySSN() throws Exception {
          TApplicant tApplicant;
  
          tApplicant = applicant.findbySSN("000000008");
  
          assertNotNull(tApplicant.getIndSsn());
          assertEquals("N",tApplicant.getAsvabScrTypCd());
  
      }
  </code></pre>
  
  <p>I am not quite sure on how to handle this.</p>
  
  <p>In the class the method looks like <code>public Optional&lt;String&gt; getAsvabScrTypCd() { return Optional.ofNullable(asvabScrTypCd);}</code></p>
  
  <p>------------------------Update 1-------------------------</p>
  
  <p>It has been brought to my attention AssertJ might be the answer however it is not recognizing <code>.isNotEmpty());</code> or <code>.hasValue("N");</code></p>
  
  <p>I double check and I have the maven dependency :</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
           &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  @Test
      @Sql({"applicant.sql"})
      public void findbySSN() throws Exception {
          TApplicant tApplicant;
  
          tApplicant = applicant.findbySSN("000000008");
  
          assertNotNull(tApplicant.getIndSsn());
  
          assertThat(tApplicant.getAsvabScrTypCd().isNotEmpty());
          assertThat(tApplicant.getAsvabScrTypCd()).hasValue("N");
      }
  </code></pre>
  
  <p>There is a similar post <a href="https://stackoverflow.com/questions/38954742/assert-that-optional-has-certain-value">HERE</a> but did not help me.</p>