class MultiTenancyPrivacyController implements PrivacyController {

  @Override
  public PrivacyGroup[] findPrivacyGroup(
      final List<String> addresses, final String enclavePublicKey) {
    if (!addresses.contains(enclavePublicKey)) {
      throw new MultiTenancyValidationException(
          "Privacy group addresses must contain the enclave public key");
    }
    final PrivacyGroup[] resultantGroups =
        privacyController.findPrivacyGroup(addresses, enclavePublicKey);
    return Arrays.stream(resultantGroups)
        .filter(g -> g.getMembers().contains(enclavePublicKey))
        .toArray(PrivacyGroup[]::new);
  }

  public  MultiTenancyPrivacyController(
      final PrivacyController privacyController,
      final Optional<BigInteger> chainId,
      final Enclave enclave,
      final boolean onchainPrivacyGroupsEnabled);
  @VisibleForTesting  MultiTenancyPrivacyController(
      final PrivacyController privacyController,
      final Optional<BigInteger> chainId,
      final Enclave enclave,
      final Optional<OnchainPrivacyGroupContract> onchainPrivacyGroupContract);

}