Implemented isObjectreachable and its test