Uses object composition and JUNIT tests.