@Override
  public long getRef(String uuid) {
    Long ref = refsByUuid.get(requireNonNull(uuid, "uuid can not be null"));
    checkState(ref != null, "No reference registered in the repository for uuid '%s'", uuid);

    return ref;
  }
@Test
  public void getRef_throws_NPE_if_uuid_is_null() {
    assertThatThrownBy(() -> underTest.getRef(null))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("uuid can not be null");
  }