Map<String, Object> variables = new HashMap<String, Object>();
variables.put("nullValue", null);
runtimeService.startProcessInstanceByKey("oneTaskProcess", variables);
// when
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery().variableValueEquals("nullValue", null);
// then
List<VariableInstance> result = query.list();
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals(1, query.count());
VariableInstance var = result.get(0);
assertEquals("nullValue", var.getName());
assertEquals(null, var.getValue());
assertEquals("null", var.getTypeName());