@Test
public void testSecureActionBadCredential() throws Exception {

    AwsProxyRequest req = new AwsProxyRequestBuilder(requestJsonStream)
            .resourcePath("/test_secure_action")
            .httpMethod("GET")
            .header("Authorization", "NgCredential")
            .build();
    AwsProxyResponse res = router.apply(req, mockContext);
    assertEquals(401, res.getStatusCode());
    assertThat(res.getHeaders(), hasEntry(CONTENT_TYPE, APPLICATION_JSON));
    assertThat(res.getHeaders(), hasEntry(ACCESS_CONTROL_ALLOW_ORIGIN, "*"));
    assertEquals(
            "{\"error\":\"Unauthorized Error\",\"description\":\"Bad Credentials\"}",
            res.getBody());
    assertFalse(res.isBase64Encoded());
}