public void setTargetServiceInstance(ServiceInstance targetServiceInstance, URI url) {
		if (Objects.nonNull(targetServiceInstance)) {
			this.targetServiceInstance = targetServiceInstance;
		}
		else if (Objects.nonNull(url)) {
			DefaultServiceInstance defaultServiceInstance = new DefaultServiceInstance();
			defaultServiceInstance.setUri(url);
			if (defaultServiceInstance.isSecure()) {
				defaultServiceInstance.setPort(443);
			}
			else {
				defaultServiceInstance.setPort(80);
			}
			this.targetServiceInstance = defaultServiceInstance;
		}
		else {
			this.targetServiceInstance = new DefaultServiceInstance();
			LOGGER.warn("TargetServiceInstance is empty.");
		}
	}
@Test
	public void testSetTargetServiceInstance() throws URISyntaxException {
		EnhancedPluginContext enhancedPluginContext = new EnhancedPluginContext();

		// targetServiceInstance != null
		DefaultServiceInstance testDefaultServiceInstance = new DefaultServiceInstance();
		testDefaultServiceInstance.setPort(1);
		enhancedPluginContext.setTargetServiceInstance(testDefaultServiceInstance, null);
		assertThat(enhancedPluginContext.getTargetServiceInstance().getPort()).isEqualTo(1);

		// targetServiceInstance == null && url != null
		enhancedPluginContext.setTargetServiceInstance(null, new URI("https://www.qq.com"));
		assertThat(enhancedPluginContext.getTargetServiceInstance().getPort()).isEqualTo(443);

		// targetServiceInstance == null && url == null
		enhancedPluginContext.setTargetServiceInstance(null, null);
		assertThat(enhancedPluginContext.getTargetServiceInstance().getPort()).isEqualTo(0);
	}