@Test
  public void testEncryptedJoinRequest() throws Exception {
    MemberIdentifier otherMbr = MemberIdentifierUtil.createMemberID(8888);

    initMocks(false, true);

    GMSMembershipView v = createView(otherMbr);

    GMSEncrypt otherMbrEncrptor = new GMSEncrypt(services, AES_128);

    messenger.setPublicKey(otherMbrEncrptor.getPublicKeyBytes(), otherMbr);
    messenger.initClusterKey();

    JoinRequestMessage gfmsg =
        new JoinRequestMessage(otherMbr, messenger.getMemberID(), null, 9789, 1);

    short version = KnownVersion.getCurrentVersion().ordinal();

    BufferDataOutputStream out =
        new BufferDataOutputStream(KnownVersion.getCurrentVersion());

    messenger.writeEncryptedMessage(gfmsg, otherMbr, version, out);

    byte[] requestBytes = out.toByteArray();

    DataInputStream dis = new DataInputStream(new ByteArrayInputStream(requestBytes));

    Message distributionMessage =
        messenger.readEncryptedMessage(dis, version, otherMbrEncrptor);

    assertEquals(gfmsg, distributionMessage);
  }
messages for the Manager that were queued by a quorum checker shouldn't be delivered to
a Manager
geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java