Unittest for different design patterns