Added unit test for analysis