Changed the method for testing object and methods