@Test
public void test_createNestedfolder_successfully() {

    String responseJson = "{\"messages\":[\"Folder created \"]}";
    String path = "shared/mysafe01";
    String jsonStr = "{\"path\":\"" + path + "\",\"data\":{\"default\":\"default\"}}";
    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    Response response = getMockResponse(HttpStatus.OK, true, responseJson);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseJson);
    when(ControllerUtil.isPathValid(path)).thenReturn(true);
    when(reqProcessor.process("/sdb/createfolder",jsonStr,token)).thenReturn(response);
    UserDetails userDetails = getMockUser(false);
    VaultTokenLookupDetails  vaultTokenLookupDetails = new VaultTokenLookupDetails();
    vaultTokenLookupDetails.setPolicies(new String[] {"w_shared_mysafe01"});
    when(ControllerUtil.getSafeType(path)).thenReturn("shared");
    when(ControllerUtil.getSafeName(path)).thenReturn("mysafe01");
    try {
        when(tokenValidator.getVaultTokenLookupDetails(token)).thenReturn(vaultTokenLookupDetails);
    } catch (TVaultValidationException e) {}
    ResponseEntity<String> responseEntity = safesService.createNestedfolder(token, path, userDetails);
    assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
}