public void setUpRuntimeData() {
mockedQuery = setUpMockDeploymentQuery(MockProvider.createMockDeployments());
}
private DeploymentQuery setUpMockDeploymentQuery(List<Deployment> mockedDeployments) {
DeploymentQuery sampleDeploymentQuery = mock(DeploymentQuery.class);
when(sampleDeploymentQuery.list()).thenReturn(mockedDeployments);
when(sampleDeploymentQuery.count()).thenReturn((long) mockedDeployments.size());
when(processEngine.getRepositoryService().createDeploymentQuery()).thenReturn(sampleDeploymentQuery);
return sampleDeploymentQuery;
}