@Override
    public void persistInstance(final InstanceEntity instance) {
        InstanceInfo.Builder instanceInfoBuilder = instanceInfoBuilder();
        InstanceInfo instanceInfo = instanceInfoBuilder
                .setAppName(instance.getAppName())
                .setIPAddr(instance.getHost())
                .setHostName(instance.getHost())
                .setPort(instance.getPort())
                .setStatus(InstanceInfo.InstanceStatus.UP)
                .build();
        LeaseInfo.Builder leaseInfoBuilder = LeaseInfo.Builder.newBuilder()
                .setRenewalIntervalInSecs(eurekaInstanceConfig.getLeaseRenewalIntervalInSeconds())
                .setDurationInSecs(eurekaInstanceConfig.getLeaseExpirationDurationInSeconds());
        instanceInfo.setLeaseInfo(leaseInfoBuilder.build());
        ApplicationInfoManager applicationInfoManager = new ApplicationInfoManager(eurekaInstanceConfig, instanceInfo);
        new DiscoveryClient(applicationInfoManager, eurekaClientConfig, new Jersey3TransportClientFactories());
    }
@Test
    public void persistInstance() {
        repository.persistInstance(instance);
        assertTrue(instanceStorage.containsKey(instance.getAppName().toUpperCase()));
        InstanceInfo instanceInfo = instanceStorage.get(instance.getAppName().toUpperCase());
        assertEquals(instance.getHost(), instanceInfo.getHostName());
        assertEquals(instance.getPort(), instanceInfo.getPort());
        assertEquals(instance.getAppName().toUpperCase(), instanceInfo.getAppName());
    }