series of TDD java codes