@Test
public void testApplyEnvs() throws Exception {

	environmentVariables.set(MeshOptions.MESH_DEFAULT_LANG_ENV, "ru");
	environmentVariables.set(MeshOptions.MESH_UPDATECHECK_ENV, "false");
	environmentVariables.set(HttpServerConfig.MESH_HTTP_PORT_ENV, "8100");
	environmentVariables.set(ElasticSearchOptions.MESH_ELASTICSEARCH_URL_ENV, "https://somewhere.com");
	environmentVariables.set(MeshOptions.MESH_CLUSTER_INIT_ENV, "true");
	environmentVariables.set(HttpServerConfig.MESH_HTTP_CORS_ORIGIN_PATTERN_ENV, "*");
	environmentVariables.set(HttpServerConfig.MESH_HTTP_CORS_ENABLE_ENV, "true");
	environmentVariables.set(VertxOptions.MESH_VERTX_EVENT_POOL_SIZE_ENV, "41");
	environmentVariables.set(VertxOptions.MESH_VERTX_WORKER_POOL_SIZE_ENV, "42");
	environmentVariables.set(MeshOptions.MESH_LOCK_PATH_ENV, "dummy/1234");
	environmentVariables.set(MeshUploadOptions.MESH_BINARY_DIR_ENV, "/uploads");
	environmentVariables.set(MonitoringConfig.MESH_MONITORING_HTTP_HOST_ENV, "0.0.0.0");
	environmentVariables.set(ContentConfig.MESH_CONTENT_AUTO_PURGE_ENV, "true");
	environmentVariables.set(ElasticSearchOptions.MESH_ELASTICSEARCH_MAPPING_MODE_ENV, "STRICT");
	environmentVariables.set(ImageManipulatorOptions.MESH_IMAGE_CACHE_DIRECTORY_ENV, "data" + File.separator +"binaryImageCache");
	MeshOptions options = OptionsLoader.createOrloadOptions();
	assertEquals(8100, options.getHttpServerOptions().getPort());
	assertEquals("ru", options.getDefaultLanguage());
	assertFalse(options.isUpdateCheckEnabled());
	assertEquals("https://somewhere.com", options.getSearchOptions().getUrl());
	assertTrue(options.isInitClusterMode());
	assertTrue(options.getHttpServerOptions().getEnableCors());
	assertEquals(41, options.getVertxOptions().getEventPoolSize());
	assertEquals(42, options.getVertxOptions().getWorkerPoolSize());
	assertEquals("*", options.getHttpServerOptions().getCorsAllowedOriginPattern());
	assertEquals("dummy/1234", options.getLockPath());
	assertEquals("/uploads", options.getUploadOptions().getDirectory());
	assertEquals("0.0.0.0", options.getMonitoringOptions().getHost());
	assertTrue(options.getContentOptions().isAutoPurge());
	assertEquals(MappingMode.STRICT, options.getSearchOptions().getMappingMode());
	assertEquals("data" + File.separator + "binaryImageCache", options.getImageOptions().getImageCacheDirectory());
}