### Question:
PeerDiscoveryRequest { public boolean validateMessageResponse(PeerDiscoveryMessage message) { return this.expectedResponse == message.getMessageType() && !this.hasExpired(); } PeerDiscoveryRequest(String messageId, PeerDiscoveryMessage message, InetSocketAddress address, DiscoveryMessageType expectedResponse, Long expirationPeriod, int attemptNumber, Node relatedNode); String getMessageId(); PeerDiscoveryMessage getMessage(); InetSocketAddress getAddress(); int getAttemptNumber(); Node getRelatedNode(); boolean validateMessageResponse(PeerDiscoveryMessage message); boolean hasExpired();  }### Answer:
@Test public void create() { ECKey key = new ECKey(); String check = UUID.randomUUID().toString(); PingPeerMessage pingPeerMessage = PingPeerMessage.create("localhost", 80, check, key, NETWORK_ID); PongPeerMessage pongPeerMessage = PongPeerMessage.create("localhost", 80, check, key, NETWORK_ID); InetSocketAddress address = new InetSocketAddress("localhost", 8080); PeerDiscoveryRequest request = PeerDiscoveryRequestBuilder.builder().messageId(check) .message(pingPeerMessage).address(address).expectedResponse(DiscoveryMessageType.PONG) .expirationPeriod(1000).attemptNumber(1).build(); Assert.assertNotNull(request); Assert.assertTrue(request.validateMessageResponse(pongPeerMessage)); Assert.assertFalse(request.validateMessageResponse(pingPeerMessage)); }