update Main and add simple JUnit