@Test
public void writeFieldInArrayCheckConditionTest() throws Exception {

    final String operatorName = "$in";
    FieldPath fieldPath = PostgresFieldPath.fromString(operatorName.replace("$", ""));
    List<Integer> queryParam = new ArrayList<>(Arrays.asList(1, 10, 100));
    StringWriter body = new StringWriter();
    QueryStatement queryStatement = mock(QueryStatement.class);
    when(queryStatement.getBodyWriter()).thenReturn(body);
    resolver
            .resolve(operatorName)
            .write(queryStatement, resolver, fieldPath, queryParam);
    assertEquals(queryStatement.getBodyWriter().toString().trim(),
            "((document#>'{in}')in(to_json(?)::jsonb,to_json(?)::jsonb,to_json(?)::jsonb))");
    verify(queryStatement).pushParameterSetter(any());
}