@Test
public void testReadRequest() {
exchange.setFromEndpoint(endpoint);
MockHttpServletRequest request = new MockHttpServletRequest();
HttpMessage message = new HttpMessage(exchange, request, null);
request.addHeader(GTaskBinding.GAE_QUEUE_NAME, "a");
request.addHeader(GTaskBinding.GAE_TASK_NAME, "b");
request.addHeader(GTaskBinding.GAE_RETRY_COUNT, "1");
// test invocation of inbound binding via dynamic proxy
endpoint.getBinding().readRequest(request, message);
assertEquals("a", message.getHeader(GTaskBinding.GTASK_QUEUE_NAME));
assertEquals("b", message.getHeader(GTaskBinding.GTASK_TASK_NAME));
assertEquals(1, message.getHeader(GTaskBinding.GTASK_RETRY_COUNT));
assertFalse(message.getHeaders().containsKey(GTaskBinding.GAE_QUEUE_NAME));
assertFalse(message.getHeaders().containsKey(GTaskBinding.GAE_TASK_NAME));
assertFalse(message.getHeaders().containsKey(GTaskBinding.GAE_RETRY_COUNT));
}