A prototype to mock non virtual function in cpp