Java socket tests