public CompletableFuture<GetResult> get(byte[] user, byte[] hmac) {
    return getUser(user).thenApply(getItemResponse -> {
      if (!getItemResponse.hasItem()) {
        return GetResult.NOT_STORED;
      }

      Record record = Record.from(user, getItemResponse.item());
      if (!MessageDigest.isEqual(hmac, record.password)) {
        return GetResult.PASSWORD_MISMATCH;
      }
      return GetResult.found(record);
    });
  }
@Test
  void testGet() {
    byte[] wrongUser = TestRandomUtil.nextBytes(16);
    byte[] wrongPassword = TestRandomUtil.nextBytes(16);
    assertThat(subscriptions.create(user, password, created)).succeedsWithin(DEFAULT_TIMEOUT);

    assertThat(subscriptions.get(user, password)).succeedsWithin(DEFAULT_TIMEOUT).satisfies(getResult -> {
      assertThat(getResult.type).isEqualTo(FOUND);
      assertThat(getResult.record).isNotNull().satisfies(checkFreshlyCreatedRecord(user, password, created));
    });

    assertThat(subscriptions.get(user, wrongPassword)).succeedsWithin(DEFAULT_TIMEOUT)
        .satisfies(getResult -> {
          assertThat(getResult.type).isEqualTo(PASSWORD_MISMATCH);
          assertThat(getResult.record).isNull();
        });

    assertThat(subscriptions.get(wrongUser, password)).succeedsWithin(DEFAULT_TIMEOUT)
        .satisfies(getResult -> {
          assertThat(getResult.type).isEqualTo(NOT_STORED);
          assertThat(getResult.record).isNull();
        });
  }