title: how to check equal for enum
body: <p>I have Enum</p>
  
  <pre><code>public class TestResult {
  
      MY_ENUM {
          @Override
          public String toString() {
              return "Test1";
          }
  
          @Override
          public boolean isTested() {
              return true;
          }
  
          public abstract boolean isTested();
      }
      private MY_ENUM myEnum;
      public MY_ENUM getMyEnum() {
          return myEnum ;
      }
  }
  </code></pre>
  
  <p>I have other class the keep the varaible</p>
  
  <pre><code>public class Result {
      private final TestResult testResult ;
  }
  </code></pre>
  
  <p>I want to check if testResult.getMyEnum() equal  <code>TestResult.MY_ENUM.</code>
  Do I need to do it  :</p>
  
  <pre><code> 1 .  testResult.getMyEnum() == TestResult.MY_ENUM.
  </code></pre>
  
  <p>Does it check the value of toString and isTested?</p>
  
  <pre><code>2.   testResult.getMyEnum().toString().equal(TestResult.MY_ENUM.toString()) 
  
  
  3.  testResult.getMyEnum().equal(TestResult.MY_ENUM)
  </code></pre>
  
  <p>Does it check the value of toString and isTested?</p>