Mock getEnvironment method