make an test code private except the setupTests function, and improve docs