use of com.sequenceiq.it.cloudbreak.dto.clustertemplate.ClusterTemplateTestDto in project cloudbreak by hortonworks.
the class ClusterTemplateTest method validateDefaultCount.
private ClusterTemplateTestDto validateDefaultCount(TestContext tc, ClusterTemplateTestDto entity, CloudbreakClient cc) {
try {
assertNotNull(entity);
assertNotNull(entity.getResponses());
long defaultCount = entity.getResponses().stream().filter(template -> ResourceStatus.DEFAULT.equals(template.getStatus())).count();
long expectedCount = 602;
assertEquals("Should have " + expectedCount + " of default cluster templates.", expectedCount, defaultCount);
} catch (Exception e) {
throw new TestFailException(String.format("Failed to validate default count of cluster templates: %s", e.getMessage()), e);
}
return entity;
}
Aggregations