}
public synchronized Service getService(String name) throws ServiceException {
- Service s = registeredServices.get(name);
- if (s == null) {
+ Service service = registeredServices.get(name);
+ if (service == null) {
throw new ServiceException("Could not find service: " + name);
}
- return s;
+ return service;
}
public synchronized Service get(String name) {
try {
Files.delete(getPath(service));
} catch (Exception e) {
-
+ // Doesn't matter.
}
}
}
// check that the service can be deleted
this.services.remove(SERVICE);
servicesRestored = new Services(this.applicationConfig);
- assertThat(servicesRestored.size()).isEqualTo(0);
+ assertThat(servicesRestored.size()).isZero();
}
@Test
// Test that the type has been synched
Ric addedRic = this.rics.getRic(RIC);
- assertThat(addedRic.getSupportedPolicyTypes().size()).isEqualTo(1);
+ assertThat(addedRic.getSupportedPolicyTypes()).hasSize(1);
assertThat(addedRic.getSupportedPolicyTypes().iterator().next().getId()).isEqualTo(TYPE);
// Check that a service callback for the AVAILABLE RIC is invoked
// Check that no service callback for the UNAVAILABLE RIC is invoked
RappSimulatorController.TestResults receivedCallbacks = rAppSimulator.getTestResults();
- assertThat(receivedCallbacks.getReceivedInfo().size()).isEqualTo(0);
+ assertThat(receivedCallbacks.getReceivedInfo()).isEmpty();
- // Run a synch and check that the AVAILABLE notificationis received
+ // Run a synch and check that the AVAILABLE notification is received
a1ClientFactory.reset();
supervision.checkAllRics();
waitForRicState(RIC, RicState.AVAILABLE);