testing java object