@Test
    public void boolean_fields_can_be_used_for_equality_comparisons() throws ParseException {
        var documents = createDocs();
        // Doc 8 has bool field set explicitly to true, doc 9 has field explicitly set to false
        assertEquals(Result.TRUE, evaluate("test.truth == 1", documents.get(8)));
        assertEquals(Result.TRUE, evaluate("test.truth == true", documents.get(8)));
        assertEquals(Result.FALSE, evaluate("test.truth == 1", documents.get(9)));
        assertEquals(Result.FALSE, evaluate("test.truth == true", documents.get(9)));
        assertEquals(Result.TRUE, evaluate("test.truth == 0", documents.get(9)));
        assertEquals(Result.TRUE, evaluate("test.truth == false", documents.get(9)));
        // FIXME very un-intuitive behavior when nulls are implicitly returned:
        // Doc 1 does not have the bool field set, but the implicit null value is neither true nor false
        assertEquals(Result.FALSE, evaluate("test.truth == 1", documents.get(0)));
        assertEquals(Result.FALSE, evaluate("test.truth == true", documents.get(0)));
        assertEquals(Result.FALSE, evaluate("test.truth == 0", documents.get(0)));
        assertEquals(Result.FALSE, evaluate("test.truth == false", documents.get(0)));
    }
@author Simon Thoresen Hult
@author bratseth
document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java