components.add(comp4);
// Capabilities.
LOG.info("Creating capabilities.");
ArrayList<Capability> capabilities = Lists.newArrayList();
Capability capa1 = new Capability(
projectId, attributes.get(0).getAttributeId(), components.get(1).getComponentId());
capa1.setName("Credit card processing takes less than 5 seconds");
capa1.setFailureRate(FailureRate.OFTEN);
capa1.addLabel("external");
capa1.addLabel("load test");
capa1.setDescription("Order is completed from clicking 'ORDER NOW' to success page.");
capa1.setUserImpact(UserImpact.MINIMAL);
capa1.setCapabilityId(projectService.createCapability(capa1).getCapabilityId());
capabilities.add(capa1);
Capability capa2 = new Capability(
projectId, attributes.get(0).getAttributeId(), components.get(1).getComponentId());
capa2.setName("Saved addresses and credit cards appear quickly");
capa2.setFailureRate(FailureRate.OCCASIONALLY);
capa2.setUserImpact(UserImpact.MAXIMAL);
capa2.setCapabilityId(projectService.createCapability(capa2).getCapabilityId());
capabilities.add(capa2);
Capability capa3 = new Capability(
projectId, attributes.get(2).getAttributeId(), components.get(1).getComponentId());
capa3.setName("All traffic is sent over https");
capa3.addLabel("ssl");
capa3.setFailureRate(FailureRate.NA);
capa3.setUserImpact(UserImpact.MAXIMAL);
capa3.setCapabilityId(projectService.createCapability(capa3).getCapabilityId());
capabilities.add(capa3);
Capability capa4 = new Capability(
projectId, attributes.get(2).getAttributeId(), components.get(3).getComponentId());
capa4.setName("Items removed from inventory do not appear in search");
capa4.setFailureRate(FailureRate.VERY_RARELY);
capa4.setUserImpact(UserImpact.NA);
capa4.setCapabilityId(projectService.createCapability(capa4).getCapabilityId());
capabilities.add(capa4);
// Bugs.
LOG.info("Creating bugs.");
List<Bug> bugs = Lists.newArrayList();