Java instructions for list test