example with Java and Jersey 2