use of de.codecentric.boot.admin.client.config.AdminProperties in project spring-boot-admin by codecentric.
the class ApplicationRegistratorTest method setup.
@Before
public void setup() {
restTemplate = mock(RestTemplate.class);
adminProps = new AdminProperties();
adminProps.setUrl(new String[] { "http://sba:8080", "http://sba2:8080" });
ApplicationFactory factory = mock(ApplicationFactory.class);
when(factory.createApplication()).thenReturn(Application.create("AppName").withManagementUrl("http://localhost:8080/mgmt").withHealthUrl("http://localhost:8080/health").withServiceUrl("http://localhost:8080").build());
registrator = new ApplicationRegistrator(restTemplate, adminProps, factory);
headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
}
Aggregations