public void Decode() { ControlResponse response = new ControlResponse(); response.wireDecode(TestControlResponse1); Assert.AssertEquals(response.getStatusCode(), 404); Assert.AssertEquals(response.getStatusText(), "Nothing not found"); Assert.AssertEquals(response.getBodyAsControlParameters().getFaceId(), 10); }
public void Encode() { ControlResponse response = new ControlResponse(); response.setStatusCode(404); response.setStatusText("Nothing not found"); response.setBodyAsControlParameters(new ControlParameters()); response.getBodyAsControlParameters().setFaceId(10); Blob wire = response.wireEncode(); Assert.AssertEquals(wire.buf(), TestControlResponse1); }