Update Java api for setJobGroup with interruptOnCancel

Also adds a unit test.