assertEquals(0, repositoryService.createModelQuery().deploymentId(deployment.getId()).count());
assertEquals(0, repositoryService.createModelQuery().deployed().count());
assertEquals(1, repositoryService.createModelQuery().notDeployed().count());
Model model = repositoryService.createModelQuery().singleResult();
model.setDeploymentId(deployment.getId());
repositoryService.saveModel(model);
assertEquals(1, repositoryService.createModelQuery().deploymentId(deployment.getId()).count());
assertEquals(1, repositoryService.createModelQuery().deployed().count());
assertEquals(0, repositoryService.createModelQuery().notDeployed().count());