test case for design pattern