added unit tests for proper jd.environment behavior