@Test
public void testParallelForLoopBaseCases() throws Exception {

  ParallelLoopResult<Integer> nullLoopResult = Parallel.forLoop(
      null,
      new LoopBody<Integer, Integer>() {
        @Override
        public Integer run(Integer integer) {
          return integer;
        }
      });
  Assert.assertTrue(nullLoopResult.getIsCompleted());
  Assert.assertTrue(nullLoopResult.getResult().isEmpty());
  ParallelLoopResult<Integer> emptyLoopResult = Parallel.forLoop(
      new ArrayList<Integer>(),
      new LoopBody<Integer, Integer>() {
        @Override
        public Integer run(Integer integer) {
          return integer;
        }
      });
  Assert.assertTrue(emptyLoopResult.getIsCompleted());
  Assert.assertTrue(emptyLoopResult.getResult().isEmpty());
  ParallelLoopResult<Integer> singleElementLoopResult = Parallel.forLoop(
      Collections.singletonList(7),
      new LoopBody<Integer, Integer>() {
        @Override
        public Integer run(Integer integer) {
          return integer;
        }
      });
  Assert.assertTrue(singleElementLoopResult.getIsCompleted());
  List<Integer> singleElementList = singleElementLoopResult.getResult();
  Assert.assertTrue(singleElementLoopResult.getIsCompleted());
  Assert.assertFalse(singleElementList.isEmpty());
  Assert.assertEquals(1, singleElementList.size());
  Assert.assertNotNull(singleElementList.get(0));
}