### Question:
DefaultApplicationRegistrator implements ApplicationRegistrator { @Override public void deregister() { String id = this.registeredId.get(); if (id == null) { return; } for (String adminUrl : this.adminUrls) { try { this.registrationClient.deregister(adminUrl, id); this.registeredId.compareAndSet(id, null); if (this.registerOnce) { break; } } catch (Exception ex) { LOGGER.warn("Failed to deregister application (id={}) at spring-boot-admin ({}): {}", id, adminUrl, ex.getMessage()); } } } DefaultApplicationRegistrator(ApplicationFactory applicationFactory, RegistrationClient registrationClient,
			String[] adminUrls, boolean registerOnce); @Override boolean register(); @Override void deregister(); @Override String getRegisteredId();  }### Answer:
@Test public void deregister_should_not_deregister_when_not_registered() { ApplicationRegistrator registrator = new DefaultApplicationRegistrator(() -> this.application, this.registrationClient, new String[] { "http: true); registrator.deregister(); verify(this.registrationClient, never()).deregister(any(), any()); }