@Test
public void test_authenticateEC2() throws Exception {

    AWSLogin awsLogin = new AWSLogin("role1", "pkcs7");
    String inputJson =new ObjectMapper().writeValueAsString(awsLogin);
    String responseMessage = "sample message";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    when(awsAuthService.authenticateEC2(Mockito.any())).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.post("/v2/auth/aws/login")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8")
            .content(inputJson))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}