Writing test for new class function