public void testLocalizeProcess() throws Exception {
  ProcessInstance processInstance=runtimeService.startProcessInstanceByKey("oneTaskProcess");
  List<ProcessInstance> processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).list();
  assertEquals(1,processes.size());
  assertNull(processes.get(0).getName());
  assertNull(processes.get(0).getDescription());
  ObjectNode infoNode=dynamicBpmnService.getProcessDefinitionInfo(processInstance.getProcessDefinitionId());
  dynamicBpmnService.changeLocalizationName("en-GB","oneTaskProcess","The One Task Process 'en-GB' localized name",infoNode);
  dynamicBpmnService.changeLocalizationDescription("en-GB","oneTaskProcess","The One Task Process 'en-GB' localized description",infoNode);
  dynamicBpmnService.saveProcessDefinitionInfo(processInstance.getProcessDefinitionId(),infoNode);
  dynamicBpmnService.changeLocalizationName("en","oneTaskProcess","The One Task Process 'en' localized name",infoNode);
  dynamicBpmnService.changeLocalizationDescription("en","oneTaskProcess","The One Task Process 'en' localized description",infoNode);
  dynamicBpmnService.saveProcessDefinitionInfo(processInstance.getProcessDefinitionId(),infoNode);
  processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).list();
  assertEquals(1,processes.size());
  assertNull(processes.get(0).getName());
  assertNull(processes.get(0).getDescription());
  processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("es").list();
  assertEquals(1,processes.size());
  assertEquals("Nombre del proceso",processes.get(0).getName());
  assertEquals("Descripción del proceso",processes.get(0).getDescription());
  processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("en-GB").list();
  assertEquals(1,processes.size());
  assertEquals("The One Task Process 'en-GB' localized name",processes.get(0).getName());
  assertEquals("The One Task Process 'en-GB' localized description",processes.get(0).getDescription());
  processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).listPage(0,10);
  assertEquals(1,processes.size());
  assertNull(processes.get(0).getName());
  assertNull(processes.get(0).getDescription());
  processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("es").listPage(0,10);
  assertEquals(1,processes.size());
  assertEquals("Nombre del proceso",processes.get(0).getName());
  assertEquals("Descripción del proceso",processes.get(0).getDescription());
  processes=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("en-GB").listPage(0,10);
  assertEquals(1,processes.size());
  assertEquals("The One Task Process 'en-GB' localized name",processes.get(0).getName());
  assertEquals("The One Task Process 'en-GB' localized description",processes.get(0).getDescription());
  processInstance=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).singleResult();
  assertNull(processInstance.getName());
  assertNull(processInstance.getDescription());
  processInstance=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("es").singleResult();
  assertEquals("Nombre del proceso",processInstance.getName());
  assertEquals("Descripción del proceso",processInstance.getDescription());
  processInstance=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("en-GB").singleResult();
  assertEquals("The One Task Process 'en-GB' localized name",processInstance.getName());
  assertEquals("The One Task Process 'en-GB' localized description",processInstance.getDescription());
  processInstance=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).singleResult();
  assertNull(processInstance.getName());
  assertNull(processInstance.getDescription());
  processInstance=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("en").singleResult();
  assertEquals("The One Task Process 'en' localized name",processInstance.getName());
  assertEquals("The One Task Process 'en' localized description",processInstance.getDescription());
  processInstance=runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).locale("en-AU").withLocalizationFallback().singleResult();
  assertEquals("The One Task Process 'en' localized name",processInstance.getName());
  assertEquals("The One Task Process 'en' localized description",processInstance.getDescription());
}
