class RdfEngine implements Engine {

    @Override
    public void updateGroup(Group newGroup) {
        if (!groupExists(newGroup.getResource())) {
            throw new IllegalArgumentException("Group with that id does not exist");
        }
        try (RepositoryConnection conn = repository.getConnection()) {
            conn.remove(newGroup.getResource(), null, null, context);
            conn.add(newGroup.getModel(), context);
        }
    }

}