@Override
	public ResourceSet saveNew(ResourceSet rs) {

		if (rs.getId() != null) {
			throw new IllegalArgumentException("Can't save a new resource set with an ID already set to it.");
		}

		if (!checkScopeConsistency(rs)) {
			throw new IllegalArgumentException("Can't save a resource set with inconsistent claims.");
		}

		ResourceSet saved = repository.save(rs);

		return saved;

	}
@Test(expected = IllegalArgumentException.class)
	public void testSaveNew_hasId() {

		ResourceSet rs = new ResourceSet();
		rs.setId(1L);

		resourceSetService.saveNew(rs);

	}