java test and example techniques