public List<ServiceInstance> getInstances(String serviceId) throws PolarisException {
		serviceId = DiscoveryUtil.rewriteServiceId(serviceId);
		List<ServiceInstance> instances = new ArrayList<>();
		InstancesResponse filteredInstances = polarisDiscoveryHandler.getHealthyInstances(serviceId);
		ServiceInstances serviceInstances = filteredInstances.toServiceInstances();
		for (Instance instance : serviceInstances.getInstances()) {
			instances.add(new PolarisServiceInstance(instance, filteredInstances.getMetadata()));
		}
		return instances;
	}
@Test
	public void testGetInstances() {
		DefaultServiceInstances mockDefaultServiceInstances = mock(DefaultServiceInstances.class);
		when(mockDefaultServiceInstances.getInstances()).thenReturn(singletonList(mock(DefaultInstance.class)));
		InstancesResponse mockInstancesResponse = mock(InstancesResponse.class);
		when(mockInstancesResponse.toServiceInstances()).thenReturn(mockDefaultServiceInstances);
		when(polarisDiscoveryHandler.getHealthyInstances(anyString())).thenReturn(mockInstancesResponse);

		List<ServiceInstance> serviceInstances = polarisServiceDiscovery.getInstances(SERVICE_PROVIDER);

		assertThat(serviceInstances).isNotEmpty();
	}