Java rest services practice