code: public void testQueryByDeploymentIdIn(){
    List<String> deploymentIds=new ArrayList<String>();
    deploymentIds.add(deployment.getId());
    List<ProcessInstance> instances=runtimeService.createProcessInstanceQuery().deploymentIdIn(deploymentIds).list();
    assertEquals(PROCESS_DEPLOY_COUNT,instances.size());
    ProcessInstance processInstance=instances.get(0);
    assertEquals(deployment.getId(),processInstance.getDeploymentId());
    assertEquals(new Integer(1),processInstance.getProcessDefinitionVersion());
    assertEquals(PROCESS_DEFINITION_KEY,processInstance.getProcessDefinitionKey());
    assertEquals("oneTaskProcessName",processInstance.getProcessDefinitionName());
    assertEquals(PROCESS_DEPLOY_COUNT,runtimeService.createProcessInstanceQuery().deploymentIdIn(deploymentIds).count());
  }
  