@Test public void testWithNegativeRootVolumeSize() { Stack stack = stackWithRootVolumeSize(-1); ValidationResult.ValidationResultBuilder builder = new ValidationResult.ValidationResultBuilder(); underTest.validate(stack, builder); assertEquals(ERROR, builder.build().getState()); }
public void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder) { if (CollectionUtils.isEmpty(subject.getInstanceGroups())) { validationBuilder.error("Stack request must contain instance groups."); } validateTemplates(subject, validationBuilder); validateEncryptionKey(subject, validationBuilder); }
StackValidator { public void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder) { if (CollectionUtils.isEmpty(subject.getInstanceGroups())) { validationBuilder.error("Stack request must contain instance groups."); } validateTemplates(subject, validationBuilder); validateEncryptionKey(subject, validationBuilder); } }
StackValidator { public void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder) { if (CollectionUtils.isEmpty(subject.getInstanceGroups())) { validationBuilder.error("Stack request must contain instance groups."); } validateTemplates(subject, validationBuilder); validateEncryptionKey(subject, validationBuilder); }  }
StackValidator { public void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder) { if (CollectionUtils.isEmpty(subject.getInstanceGroups())) { validationBuilder.error("Stack request must contain instance groups."); } validateTemplates(subject, validationBuilder); validateEncryptionKey(subject, validationBuilder); }  void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder); }
StackValidator { public void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder) { if (CollectionUtils.isEmpty(subject.getInstanceGroups())) { validationBuilder.error("Stack request must contain instance groups."); } validateTemplates(subject, validationBuilder); validateEncryptionKey(subject, validationBuilder); }  void validate(Stack subject, ValidationResult.ValidationResultBuilder validationBuilder);  }