@Test
public void moduleHaveInstance() {

    ReflectionTestUtils.setField(this.instanceInfo, "appName", "pes-service");
    List<InstanceInfo> instances = new ArrayList<>();
    instances.add(this.instanceInfo);
    given(discoveryClient.getApplication(matches("PES-SERVICE"))).willReturn(application);
    given(application.getInstances()).willReturn(instances);
    boolean moduleHaveInstance = modulesService.moduleHaveInstance("pes");
    Assert.assertTrue(moduleHaveInstance);
}