@Test
public void testCallRequest() throws Exception {

    final InputStream resource = getClass().getClassLoader().getResourceAsStream("callback-request.json");
    final byte[] requestBody = ByteStreams.toByteArray(resource);
    MockHttpServletRequest request = new MockHttpServletRequest();
    request.addHeader("X-Line-Signature", "SSSSIGNATURE");
    request.setContent(requestBody);
    doReturn(true).when(lineSignatureValidator).validateSignature(requestBody, "SSSSIGNATURE");
    final CallbackRequest callbackRequest = lineBotCallbackRequestParser.handle(request);
    assertThat(callbackRequest).isNotNull();
    final List<Event> result = callbackRequest.getEvents();
    final MessageEvent messageEvent = (MessageEvent) result.get(0);
    final TextMessageContent text = (TextMessageContent) messageEvent.getMessage();
    assertThat(text.getText()).isEqualTo("Hello, world");
    final String followedUserId = messageEvent.getSource().getUserId();
    assertThat(followedUserId).isEqualTo("u206d25c2ea6bd87c17655609a1c37cb8");
    assertThat(messageEvent.getTimestamp()).isEqualTo(Instant.parse("2016-05-07T13:57:59.859Z"));
}