Added more test case for compute() method.