title: Why 'assert' is not failing in junit test
body: <p>I used 'assert' in my code.</p>
  
  <pre><code>@RunWith(PowerMockRunner.class)
  @PrepareForTest({ Puppy.class })
  public class PuppyTest {
  
      @Test
      public void testCreatePuppy() {
          // Mocking
          Human human = Mockito.mock(Human.class);
          Puppy puppy = Puppy.createPuppy("Gatsby", human);
          assert(null!=puppy);
          assert("Gatsby1".equals(puppy.getName()));
          assert false;   //This should fail anyway
      }
  
    .....
  
  } 
  </code></pre>
  
  <p>But , assert is not failing even for falsy conditions. 
  If I use Assert class methods, it is working as expected. </p>
  
  <pre><code>  @Test
      public void testCreatePuppy() {
          // Mocking
          Human human = Mockito.mock(Human.class);
          Puppy puppy = Puppy.createPuppy("Gatsby", human);
          Assert.assertNotNull(puppy);
          Assert.assertEquals("Gatsby1",puppy.getName());
    }
  </code></pre>
  
  <p>Can't we use assert in Junit test cases ?</p>
  
  <p><strong>Update :</strong></p>
  
  <p>I enabled assertion via passing -ea as vm argument . And it worked. :)</p>
  
  <p><a href="https://i.stack.imgur.com/GPlhk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GPlhk.png" alt="enter image description here"></a></p>