Java:Test Snippet