add test_purchase.java file.