### Question:
ProvisioningClientValidationService { public void isValidContainerName(final String containerName, final ValidatorCallback callback) { validationService.call(result -> { if (Boolean.TRUE.equals(result)) { callback.onSuccess(); } else { callback.onFailure(); } }).isValidContainerName(containerName); } @Inject  ProvisioningClientValidationService(final Caller<ProvisioningValidationService> validationService); void isValidContainerName(final String containerName,
                                     final ValidatorCallback callback);  }### Answer:
@Test public void testIsValidContainerNameForValidName() { when(validationService.isValidContainerName(CONTAINER_NAME)).thenReturn(true); service.isValidContainerName(CONTAINER_NAME, validatorCallback); verify(validationService, times(1)).isValidContainerName(CONTAINER_NAME); verify(validatorCallback, times(1)).onSuccess(); verify(validatorCallback, never()).onFailure(); }
@Test public void testIsValidContainerNameForInvalidName() { when(validationService.isValidContainerName(CONTAINER_NAME)).thenReturn(false); service.isValidContainerName(CONTAINER_NAME, validatorCallback); verify(validationService, times(1)).isValidContainerName(CONTAINER_NAME); verify(validatorCallback, times(1)).onFailure(); verify(validatorCallback, never()).onSuccess(); }