@Test
public void test_readFromVault() throws Exception {

    String responseMessage = "{  \"data\": {    \"secret1\": \"value1\",    \"secret2\": \"value2\"  }}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    when(secretService.readFromVault(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), eq("users/safe1"))).thenReturn(responseEntityExpected);
    when(secretService.readFoldersAndSecrets(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), eq("users/safe1"))).thenReturn(responseEntityExpected);
    when(secretService.readFromVaultRecursive(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), eq("users/safe1"))).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.get("/v2/safes/folders/secrets?path=users/safe1")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8"))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
    mockMvc.perform(MockMvcRequestBuilders.get("/v2/safes/folders/secrets?path=users/safe1&fetchOption=all")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8"))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
    mockMvc.perform(MockMvcRequestBuilders.get("/v2/safes/folders/secrets?path=users/safe1&fetchOption=recursive")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8"))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}