Mockmvc returns empty response body even if response status is 200 and if i invoke this api is success

Viewed 8

public void test() throws Exception {

    mvc.perform(get("/v2/test")
            .header("Client-Id", "EPC-TaxManagement").header
                ("User-Id", "33").header("transaction-id", "8a24b6d7-ff83-45f2-991c-498af0e2436b").accept(MediaType.APPLICATION_JSON))
        .andExpect(status().isOk())
        .andDo(print());
}
0 Answers
Related