@Nullable
	static ProxyProvider createFrom(Properties properties) {
		Objects.requireNonNull(properties, "properties");

		if (properties.containsKey(HTTP_PROXY_HOST) || properties.containsKey(HTTPS_PROXY_HOST)) {
			return createHttpProxyFrom(properties);
		}
		if (properties.containsKey(SOCKS_PROXY_HOST)) {
			return createSocksProxyFrom(properties);
		}

		return null;
	}
@Test
	void proxyFromSystemProperties_npeWhenHttpsProxyUsernameIsSetButNotPassword() {
		Properties properties = new Properties();
		properties.setProperty(ProxyProvider.HTTPS_PROXY_HOST, "host");
		properties.setProperty(ProxyProvider.HTTPS_PROXY_USER, "user");

		Throwable throwable = catchThrowable(() -> ProxyProvider.createFrom(properties));
		assertThat(throwable)
				.isInstanceOf(NullPointerException.class)
				.hasMessage("Proxy username is set via 'https.proxyUser', but 'https.proxyPassword' is not set.");
	}