public static RPCResponse createResponse() { int xid = XID.next(); RPCResponse response = new RPCResponse(xid, RPC_VERSION); response.setReplyState(RPC_REPLY_STATE_ACCEPT); response.setAcceptState(RPC_ACCEPT_STATE_ACCEPT); response.setAuthState(0); response.setVerifier(new VerifierNone()); assertEquals(xid, response.getXid()); assertEquals(RPC_MESSAGE_TYPE_REPLY, response.getMessageType()); assertEquals(RPC_REPLY_STATE_ACCEPT, response.getReplyState()); assertEquals(RPC_ACCEPT_STATE_ACCEPT, response.getAcceptState()); assertEquals(0, response.getAuthState()); return response; }
public static RPCRequest createRequest() { int xid = XID.next(); RPCRequest base = new RPCRequest(xid, RPC_VERSION); base.setProgram(NFS_PROG); base.setProcedure(NFS_PROC_COMPOUND); base.setProgramVersion(NFS_VERSION); assertEquals(xid, base.getXid()); assertEquals(RPC_MESSAGE_TYPE_CALL, base.getMessageType()); assertEquals(RPC_VERSION, base.getRpcVersion()); assertEquals(NFS_PROG, base.getProgram()); assertEquals(NFS_VERSION, base.getProgramVersion()); assertEquals(NFS_PROC_COMPOUND, base.getProcedure()); base.setCredentials(new CredentialsNone()); base.setVerifier(new VerifierNone()); assertEquals(RPC_AUTH_NULL, base.getCredentials().getFlavor()); return base; }