Fix multiple addition of default args.

Not sure this is the best way to do it in Java, but
added a test for multiple groups and tests and made sure
default params are only generated once.