Can you not mock the rxEnvironment service instead of injecting it into your unit test?