Update test.java

New api.  This should be working.