### Question:
Federation { public boolean hasMemberWithUscAddress(byte[] address) { return uscPublicKeys.stream() .anyMatch(k -> Arrays.equals(k.getAddress(), address)); } Federation(List<UldECKey> publicKeys, Instant creationTime, long creationBlockNumber,  NetworkParameters uldParams); List<UldECKey> getPublicKeys(); int getNumberOfSignaturesRequired(); Instant getCreationTime(); NetworkParameters getUldParams(); long getCreationBlockNumber(); Script getRedeemScript(); Script getP2SHScript(); Address getAddress(); int getSize(); Integer getPublicKeyIndex(UldECKey key); boolean hasPublicKey(UldECKey key); boolean hasMemberWithUscAddress(byte[] address); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode();  }### Answer:
@Test public void hasMemberWithUscAddress() { for (int i = 0; i < federation.getPublicKeys().size(); i++) { Assert.assertTrue(federation.hasMemberWithUscAddress(uscAddresses.get(i))); } UldECKey nonFederateKey = UldECKey.fromPrivate(BigInteger.valueOf(1234)); byte[] nonFederateUscAddress = getUscAddressFromUldKey(nonFederateKey); Assert.assertFalse(federation.hasMemberWithUscAddress(nonFederateUscAddress)); }