@Test
public void setIfNull() {

  final List<Task> taskList = mockTaskList();
  pendingTaskCollectionPointer.setIfNull(taskList);
  final Optional<Collection<Task>> optional = pendingTaskCollectionPointer.getAndSetNull();
  assertTrue(optional.isPresent());
  assertEquals(taskList, optional.get());
}