Adding more Java generation and tests. Working on Primary.