@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(); }
public void isValidContainerName(final String containerName, final ValidatorCallback callback) { validationService.call(result -> { if (Boolean.TRUE.equals(result)) { callback.onSuccess(); } else { callback.onFailure(); } }).isValidContainerName(containerName); }
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); } }
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); }
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); }
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);  }