Fixed the test method errors in spec and in code.