@Test
  @ClientCompatibleTest
  public void clear() {
    HazelcastInstance hazelcastInstance = createHazelcastInstance();
    IAtomicReference<String> ref = hazelcastInstance.getAtomicReference("clear");

    ref.clear();
    assertNull(ref.get());

    ref.set("foo");
    ref.clear();
    assertNull(ref.get());

    ref.set(null);
    assertNull(ref.get());
  }
  @Override
  public void clearJob(String id) throws Exception {
    if (id == null) {
      log.warn("No job to clear; was null, returning");
      return;
    }

    IAtomicReference<Job> jRef = h.getAtomicReference("job-" + id);
    if (jRef.isNull()) return;
    jRef.clear();
    log.info("Destroyed job ref " + id);
    Job remove = null;
    for (Job j : jobs) {
      if (j.getWorkerId().equals(id)) {
        remove = j;
        break;
      }
    }

    jobs.remove(remove);
  }