class RdfEngine implements Engine {

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

}