title: Boundary Case Testing in Java
body: <p>Are there any tools for JUnit or Java practises that allow for boundary case tests like "less than" and "greater than" to be accurately tested?</p>
  
  <p>For example, rounding monetary values half-up to nearest cent.
  Testing 0.005 rounds up to 0.01 is easy.
  Testing &lt;0.005 rounds down is not (strictly speaking).</p>
  
  <p>I can obviously test an arbitrary value like 0.0049, but this doesn't guarantee that another value like 0.00499 doesn't get rounded up. Is there a constant or whatever that guarantees the numerical value that is the closest possible representation to "less than" or "greater than" for the environment being executed on?</p>