title: How to compare\assert double values in rest assured
body: <p>I'm trying to compare\assert double from a JSON with java primitive double value. 
  What is the proper way to do it?</p>
  
  <p>I used simple and regular way to do it, using <code>Matchers.equalTo</code> method, see below</p>
  
  <pre><code>public class A{
         private static double someJavaDouble = 12
  }
  </code></pre>
  
  <pre><code>given().
          header(.....).
  when().
          get(url).
  then().
          statusCode(200)
          body("value", Matchers.equalTo(someJavaDouble))
  </code></pre>
  
  <p>Response of <code>get(url)</code> is JSON:</p>
  
  <pre><code>{
      "success": true,
      "currentValue": 12.0
  }
  </code></pre>
  
  <p>In the code above I get this error:</p>
  
  <pre><code>JSON path currentValue doesn't match.
  Expected: &lt;12.0&gt;
    Actual: 12.0
  </code></pre>
  
  <p>p.s.
  it works if </p>
  
  <pre><code>body("value", Matchers.equalTo(12f))
  </code></pre>