AuthorizationTree implements AuthorizationInfo { @Override public boolean isAuthorized(String blockchainAddress) { final Optional<AuthorizationNode> result = tree.breadthFirstSearch(node -> node.getAddress().equals(blockchainAddress)); return result.isPresent(); } AuthorizationTree(List<AuthorizationElement> allAuthorizationElements); @Override boolean isAuthorized(String blockchainAddress); @Override Optional<String> getServiceOwnerBlockchainAddress(); @Override Optional<String> getRealWorldIdentity(String blockchainAddress); @Override Optional<List<AuthorizationNode>> getAuthorizationLineage(String blockchainAddress); @Override String toString();  }
@Test public void authorizedParticipant() { assertTrue(this.authorizationTree.isAuthorized("0x3333")); }
@Test public void unauthorizedParticipant() { assertFalse(this.authorizationTree.isAuthorized("0x5874")); }