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