@Test
public void testCountInvalidCriteria() throws InvalidArgumentException, ReadValueException, TaskPrepareException, TaskSetConnectionException, TaskExecutionException, ChangeValueException, StorageException, SQLException {

    IAction<Long> callback = mock(IAction.class);
    when(message.getCallback()).thenReturn(callback);
    when(message.getCriteria()).thenReturn(new DSObject("{ \"filter\": 123 }"));
    try {
        task.prepare(null); // the message will be resolved by IOC
        fail();
    } catch (TaskPrepareException e) {
        // pass
    }
    verifyZeroInteractions(connection);
    verifyZeroInteractions(sqlStatement);
    verifyZeroInteractions(callback);
}