Restructure unit tests