Test the correct class is instantiated