@Test
	public void testRequests() {
		JsonRpcRequest reqSent = JsonRpcRequest.newStartRequest("fake sdp",
				new JsonRpcConstraints("sendonly", "sendonly"), 9);
		String json = GsonUtils.getGson().toJson(reqSent);
		JsonRpcRequest reqReceived = GsonUtils.getGson().fromJson(json,
				JsonRpcRequest.class);

		assertTrue(reqReceived.getMethod().equals("start"));

		if (!reqSent.toString().equals(reqReceived.toString())) {
			fail("Start requests do not match");
		}

		reqSent = JsonRpcRequest.newExecuteRequest("myCommandType",
				"myComandData", "mySessionId", 9);
		json = GsonUtils.getGson().toJson(reqSent);
		reqReceived = GsonUtils.getGson().fromJson(json, JsonRpcRequest.class);

		assertTrue(reqReceived.getMethod().equals("execute"));

		if (!reqSent.toString().equals(reqReceived.toString())) {
			fail("Execute requests do not match");
		}

		reqSent = JsonRpcRequest.newPollRequest("mySessionId", 9);
		json = GsonUtils.getGson().toJson(reqSent);
		reqReceived = GsonUtils.getGson().fromJson(json, JsonRpcRequest.class);

		assertTrue(reqReceived.getMethod().equals("poll"));

		if (!reqSent.toString().equals(reqReceived.toString())) {
			fail("Poll requests do not match");
		}

		reqSent = JsonRpcRequest.newTerminateRequest(1, "MyErroMsg", "mySessionId", 9);
		json = GsonUtils.getGson().toJson(reqSent);
		reqReceived = GsonUtils.getGson().fromJson(json, JsonRpcRequest.class);

		assertTrue(reqReceived.getMethod().equals("terminate"));

		if (!reqSent.toString().equals(reqReceived.toString())) {
			fail("Terminate requests do not match");
		}
	}