### Question:
RpcMessage { RpcMessage(int xid, Type messageType) { if (messageType != Type.RPC_CALL && messageType != Type.RPC_REPLY) { throw new IllegalArgumentException("Invalid message type " + messageType); } this.xid = xid; this.messageType = messageType; } RpcMessage(int xid, Type messageType); abstract XDR write(XDR xdr); int getXid(); Type getMessageType();  }### Answer:
@Test public void testRpcMessage() { RpcMessage msg = getRpcMessage(0, RpcMessage.Type.RPC_CALL); Assert.assertEquals(0, msg.getXid()); Assert.assertEquals(RpcMessage.Type.RPC_CALL, msg.getMessageType()); }