Fixed publication insert, fixed test (groovy can't extend java class)