Hamcrest matcher fails to match Boolean type property
<p>For class <code>A</code>;</p>

<pre><code>public class A {
    Integer value;
    Integer rate;
    Boolean checked;
}
</code></pre>

<p>I am constructing a custom Matcher like this;</p>

<p><code>Matchers.hasItems(allOf(
          hasProperty("value", equalTo(value)), 
          hasProperty("rate", equalTo(rate))))</code></p>

<p>to check if a list of <code>A</code> contains the one with <code>"value" == value &amp;&amp; "rate" == rate</code></p>

<p>The problem I have is that, when I incorporate the <code>Boolean</code> type property <code>checked</code> as a constraint to this Matcher, it always fail with error msg <code>property "checked" is not readable</code>. </p>

<p><code>Matchers.hasItems(allOf(
          hasProperty("value", equalTo(value)), 
          hasProperty("rate", equalTo(rate)),
          hasProperty("checked", equalTo(checked))))</code></p>

<p>Is it somehow related to the getter methods of boolean type fields have <code>is</code> prefix rather than <code>get</code>, and may be Hamcrest fail to use <code>is</code> prefix for getter if it is not <code>boolean</code> but <code>Boolean</code> type field.</p>

<p>Also, I should add that I cannot modify the structure of class <code>A</code>, therefore I am stuck with <code>Boolean</code> type fields.</p>