Testing concepts in Java