title: Junit not failing even if exception is thrown?
body: <p>I don't understand,</p>
  
  <p>I am doing some BigDecimal calculation, and at some point an exception is thrown (because a rounding mode is needed).
  I have been able to spot this because I have been debugging the tests.</p>
  
  <p><strong>BUT if I run the test, they do not fail!!!</strong> (I am not catching the exception, they should fail!)</p>
  
  <pre><code>import java.math.BigDecimal;
  import java.util.ArrayList;
  
  import model.classes.ShoppingItem;
  
  import static org.junit.Assert.*;
  
  public class FooTetst
  
  @Test
  public void test()  {
  
      BigDecimal foo= new BigDecimal("0.000001");
  
      foo.multiply(new BigDecimal("1")).setScale(4);//Exception thrown
  
      assertTrue(true);//test never gets here but it does not fail!
      }
  
      }
  </code></pre>
  
  <hr>
  
  <p>I would like to know if there is a safe way to run the tests: ie fail if an exception is thrown...</p>
  
  <p>Please what am I doing wrong?</p>