public Map<String, String> readHeaders(final String hashedBackupId) {
    if (hashedBackupId.isBlank()) {
      throw new IllegalArgumentException("Backup subdir name must be non-empty");
    }
    final ExternalServiceCredentials credentials = credentialsGenerator.generateFor(
        READ_ENTITY_PREFIX + hashedBackupId);
    return Map.of(HttpHeaders.AUTHORIZATION, HeaderUtils.basicAuthHeader(credentials));
  }
@Test
  public void readCredential() {
    Cdn3BackupCredentialGenerator generator = new Cdn3BackupCredentialGenerator(new TusConfiguration(
        new SecretBytes(TestRandomUtil.nextBytes(32)),
        "https://example.org/upload"));

    final Map<String, String> headers = generator.readHeaders("subdir");
    assertThat(headers).containsKey("Authorization");
    final String username = parseUsername(headers.get("Authorization"));
    assertThat(username).isEqualTo("read$backups/subdir");
  }