### Question:
ExecutionResource { @GET @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @SuppressWarnings(Constants.SUPPRESS_WARNINGS_UNCHECKED) public List<Execution> getAll() { try { List<Execution> results = (List<Execution>) HibernateUtil.queryCriteria(Execution.class); for (Execution result : results) result.setResults(new HashSet<>()); return results; } catch (Exception e) { e.printStackTrace(); throw new WebException(e, Response.Status.BAD_REQUEST); } }  @DELETE @Path("/delete/{id}") void delete(@PathParam("id") long id); @GET @Path("/get/{id}") @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) Execution get(@PathParam("id") long id); @GET @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) @SuppressWarnings(Constants.SUPPRESS_WARNINGS_UNCHECKED) List<Execution> getAll(); @GET @Path("/count-results/{executionId}") @Produces(Constants.APPLICATION_JSON_RESOURCE_PATH) Map<String, Integer> readCounterResult(@PathParam("executionId") long id);  }### Answer:
@Test public void testGetAll() throws EntityStorageException, AlgorithmLoadingException { HibernateUtil.clear(); Algorithm expectedAlgorithm1 = new Algorithm("example_ind_algorithm.jar"); algorithmResource.store(expectedAlgorithm1); Algorithm expectedAlgorithm2 = new Algorithm("example_ucc_algorithm.jar"); algorithmResource.store(expectedAlgorithm2); Execution expectedExecution1 = new Execution(expectedAlgorithm1); HibernateUtil.store(expectedExecution1); Execution expectedExecution2 = new Execution(expectedAlgorithm2); HibernateUtil.store(expectedExecution2); List<Execution> actualExecutions = executionResource.getAll(); assertThat(actualExecutions, IsIterableContainingInAnyOrder .containsInAnyOrder(expectedExecution1, expectedExecution2)); HibernateUtil.clear(); }