rewritten unit tests to use only public types