@Transactional
	public void delete(User user, long id) {
		PerfTest perfTest = getOne(id);
		// If it's not requested by user who started job. It's wrong request.
		if (!hasPermission(perfTest, user, Permission.DELETE_TEST_OF_OTHER)) {
			return;
		}
		SortedSet<Tag> tags = perfTest.getTags();
		if (tags != null) {
			tags.clear();
		}
		perfTestRepository.save(perfTest);
		perfTestRepository.delete(perfTest);
		deletePerfTestDirectory(perfTest);
	}
Delete test {@link PerfTest} by user and test id.

@param user user
@param id   test id
ngrinder-controller/src/main/java/org/ngrinder/perftest/service/PerfTestService.java