public void testProcess_Capital_Obelisk() {
CalculationDto calculation = new CalculationDto();
calculation.setBlueprintTypeName("Obelisk Blueprint");
calculation.setMaterialLevel(1);
calculation.setProductivityLevel(1);
CalculationItemDto capitalPropulsionEngineCalculationItem = new CalculationItemDto();
capitalPropulsionEngineCalculationItem.setPathExpression(PathExpression.parsePath("/20187:1:1/21009"));
capitalPropulsionEngineCalculationItem.setPerfectQuantity(15L);
capitalPropulsionEngineCalculationItem.setItemTypeID(21009L);
capitalPropulsionEngineCalculationItem.setPrice(new BigDecimal("4000000.00"));
capitalPropulsionEngineCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalPropulsionEngineCalculationItem.setWasteFactor(10);
CalculationItemDto capitalArmorPlateCalculationItem = new CalculationItemDto();
capitalArmorPlateCalculationItem.setPathExpression(PathExpression.parsePath("/20187:1:1/21017"));
capitalArmorPlateCalculationItem.setPerfectQuantity(14L);
capitalArmorPlateCalculationItem.setItemTypeID(21017L);
capitalArmorPlateCalculationItem.setPrice(new BigDecimal("4200000.00"));
capitalArmorPlateCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalArmorPlateCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayCalculationItem = new CalculationItemDto();
capitalCargoBayCalculationItem.setPathExpression(PathExpression.parsePath("/20187:1:1/21027"));
capitalCargoBayCalculationItem.setPerfectQuantity(80L);
capitalCargoBayCalculationItem.setItemTypeID(21027L);
capitalCargoBayCalculationItem.setPrice(new BigDecimal("3500000.00"));
capitalCargoBayCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayTritaniumCalculationItem = new CalculationItemDto();
capitalCargoBayTritaniumCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/34"));
capitalCargoBayTritaniumCalculationItem.setPerfectQuantity(787412L);
capitalCargoBayTritaniumCalculationItem.setItemTypeID(34L);
capitalCargoBayTritaniumCalculationItem.setPrice(new BigDecimal("2.20"));
capitalCargoBayTritaniumCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayTritaniumCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayPyeriteCalculationItem = new CalculationItemDto();
capitalCargoBayPyeriteCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/35"));
capitalCargoBayPyeriteCalculationItem.setPerfectQuantity(64939L);
capitalCargoBayPyeriteCalculationItem.setItemTypeID(35L);
capitalCargoBayPyeriteCalculationItem.setPrice(new BigDecimal("3.00"));
capitalCargoBayPyeriteCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayPyeriteCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayMexallonCalculationItem = new CalculationItemDto();
capitalCargoBayMexallonCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/36"));
capitalCargoBayMexallonCalculationItem.setPerfectQuantity(22154L);
capitalCargoBayMexallonCalculationItem.setItemTypeID(36L);
capitalCargoBayMexallonCalculationItem.setPrice(new BigDecimal("26.85"));
capitalCargoBayMexallonCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayMexallonCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayIsogenCalculationItem = new CalculationItemDto();
capitalCargoBayIsogenCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/37"));
capitalCargoBayIsogenCalculationItem.setPerfectQuantity(3154L);
capitalCargoBayIsogenCalculationItem.setItemTypeID(37L);
capitalCargoBayIsogenCalculationItem.setPrice(new BigDecimal("51.00"));
capitalCargoBayIsogenCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayIsogenCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayNocxiumCalculationItem = new CalculationItemDto();
capitalCargoBayNocxiumCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/38"));
capitalCargoBayNocxiumCalculationItem.setPerfectQuantity(898L);
capitalCargoBayNocxiumCalculationItem.setItemTypeID(38L);
capitalCargoBayNocxiumCalculationItem.setPrice(new BigDecimal("80.00"));
capitalCargoBayNocxiumCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayNocxiumCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayZydrineCalculationItem = new CalculationItemDto();
capitalCargoBayZydrineCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/39"));
capitalCargoBayZydrineCalculationItem.setPerfectQuantity(129L);
capitalCargoBayZydrineCalculationItem.setItemTypeID(39L);
capitalCargoBayZydrineCalculationItem.setPrice(new BigDecimal("1000.01"));
capitalCargoBayZydrineCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayZydrineCalculationItem.setWasteFactor(10);
CalculationItemDto capitalCargoBayMegacyteCalculationItem = new CalculationItemDto();
capitalCargoBayMegacyteCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21027:10:10/40"));
capitalCargoBayMegacyteCalculationItem.setPerfectQuantity(29L);
capitalCargoBayMegacyteCalculationItem.setItemTypeID(40L);
capitalCargoBayMegacyteCalculationItem.setPrice(new BigDecimal("1800.00"));
capitalCargoBayMegacyteCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalCargoBayMegacyteCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsCalculationItem = new CalculationItemDto();
capitalConstructionPartsCalculationItem.setPathExpression(PathExpression.parsePath("/20187:1:1/21037"));
capitalConstructionPartsCalculationItem.setPerfectQuantity(50L);
capitalConstructionPartsCalculationItem.setItemTypeID(21037L);
capitalConstructionPartsCalculationItem.setPrice(new BigDecimal("4000000.00"));
capitalConstructionPartsCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsTritaniumCalculationItem = new CalculationItemDto();
capitalConstructionPartsTritaniumCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/34"));
capitalConstructionPartsTritaniumCalculationItem.setPerfectQuantity(349387L);
capitalConstructionPartsTritaniumCalculationItem.setItemTypeID(34L);
capitalConstructionPartsTritaniumCalculationItem.setPrice(new BigDecimal("2.20"));
capitalConstructionPartsTritaniumCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsTritaniumCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsPyeriteCalculationItem = new CalculationItemDto();
capitalConstructionPartsPyeriteCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/35"));
capitalConstructionPartsPyeriteCalculationItem.setPerfectQuantity(84399L);
capitalConstructionPartsPyeriteCalculationItem.setItemTypeID(35L);
capitalConstructionPartsPyeriteCalculationItem.setPrice(new BigDecimal("3.00"));
capitalConstructionPartsPyeriteCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsPyeriteCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsMexallonCalculationItem = new CalculationItemDto();
capitalConstructionPartsMexallonCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/36"));
capitalConstructionPartsMexallonCalculationItem.setPerfectQuantity(33959L);
capitalConstructionPartsMexallonCalculationItem.setItemTypeID(36L);
capitalConstructionPartsMexallonCalculationItem.setPrice(new BigDecimal("26.85"));
capitalConstructionPartsMexallonCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsMexallonCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsIsogenCalculationItem = new CalculationItemDto();
capitalConstructionPartsIsogenCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/37"));
capitalConstructionPartsIsogenCalculationItem.setPerfectQuantity(4549L);
capitalConstructionPartsIsogenCalculationItem.setItemTypeID(37L);
capitalConstructionPartsIsogenCalculationItem.setPrice(new BigDecimal("51.00"));
capitalConstructionPartsIsogenCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsIsogenCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsNocxiumCalculationItem = new CalculationItemDto();
capitalConstructionPartsNocxiumCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/38"));
capitalConstructionPartsNocxiumCalculationItem.setPerfectQuantity(1377L);
capitalConstructionPartsNocxiumCalculationItem.setItemTypeID(38L);
capitalConstructionPartsNocxiumCalculationItem.setPrice(new BigDecimal("80.00"));
capitalConstructionPartsNocxiumCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsNocxiumCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsZydrineCalculationItem = new CalculationItemDto();
capitalConstructionPartsZydrineCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/39"));
capitalConstructionPartsZydrineCalculationItem.setPerfectQuantity(242L);
capitalConstructionPartsZydrineCalculationItem.setItemTypeID(39L);
capitalConstructionPartsZydrineCalculationItem.setPrice(new BigDecimal("1000.01"));
capitalConstructionPartsZydrineCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsZydrineCalculationItem.setWasteFactor(10);
CalculationItemDto capitalConstructionPartsMegacyteCalculationItem = new CalculationItemDto();
capitalConstructionPartsMegacyteCalculationItem.setPathExpression(PathExpression.parsePath("/20187/21037:15:15/40"));
capitalConstructionPartsMegacyteCalculationItem.setPerfectQuantity(95L);
capitalConstructionPartsMegacyteCalculationItem.setItemTypeID(40L);
capitalConstructionPartsMegacyteCalculationItem.setPrice(new BigDecimal("1800.00"));
capitalConstructionPartsMegacyteCalculationItem.setDamagePerJob(BigDecimal.ONE);
capitalConstructionPartsMegacyteCalculationItem.setWasteFactor(10);
List<CalculationItemDto> items = new ArrayList<CalculationItemDto>();
items.add(capitalPropulsionEngineCalculationItem);
items.add(capitalArmorPlateCalculationItem);
items.add(capitalCargoBayCalculationItem);
items.add(capitalConstructionPartsCalculationItem);
items.add(capitalCargoBayTritaniumCalculationItem);
items.add(capitalCargoBayPyeriteCalculationItem);
items.add(capitalCargoBayMexallonCalculationItem);
items.add(capitalCargoBayIsogenCalculationItem);
items.add(capitalCargoBayNocxiumCalculationItem);
items.add(capitalCargoBayZydrineCalculationItem);
items.add(capitalCargoBayMegacyteCalculationItem);
items.add(capitalConstructionPartsTritaniumCalculationItem);
items.add(capitalConstructionPartsPyeriteCalculationItem);
items.add(capitalConstructionPartsMexallonCalculationItem);
items.add(capitalConstructionPartsIsogenCalculationItem);
items.add(capitalConstructionPartsNocxiumCalculationItem);
items.add(capitalConstructionPartsZydrineCalculationItem);
items.add(capitalConstructionPartsMegacyteCalculationItem);
calculation.setItems(items);
CalculationTree calculationTree = new CalculationTree();
calculationTree.build(calculation);
PricingProcessorResult pricingProcessorResult = pricingProcessor.process(1L, calculationTree, new HashMap<Long, CalculationPriceSetItemDto>());
Map<Long, CalculationPriceSetItemDto> typeIdToCalculationPriceSetItemMap = pricingProcessorResult.getTypeIdToCalculationPriceSetItemMap();
assertThat(typeIdToCalculationPriceSetItemMap.size(), equalTo(9));
assertThat(pricingProcessorResult.getTotalPrice(), equalTo(new BigDecimal("519260766.67")));
assertThat(capitalPropulsionEngineCalculationItem.getQuantity(), equalTo(16L));
assertThat(capitalArmorPlateCalculationItem.getQuantity(), equalTo(15L));
assertThat(capitalCargoBayCalculationItem.getQuantity(), equalTo(84L));
assertThat(capitalConstructionPartsCalculationItem.getQuantity(), equalTo(53L));
assertThat(capitalCargoBayTritaniumCalculationItem.getQuantity(), equalTo(794570L));
assertThat(capitalCargoBayPyeriteCalculationItem.getQuantity(), equalTo(65529L));
assertThat(capitalCargoBayMexallonCalculationItem.getQuantity(), equalTo(22355L));
assertThat(capitalCargoBayIsogenCalculationItem.getQuantity(), equalTo(3183L));
assertThat(capitalCargoBayNocxiumCalculationItem.getQuantity(), equalTo(906L));
assertThat(capitalCargoBayZydrineCalculationItem.getQuantity(), equalTo(130L));
assertThat(capitalCargoBayMegacyteCalculationItem.getQuantity(), equalTo(29L));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getQuantity(), equalTo(351571L));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getQuantity(), equalTo(84926L));
assertThat(capitalConstructionPartsMexallonCalculationItem.getQuantity(), equalTo(34171L));
assertThat(capitalConstructionPartsIsogenCalculationItem.getQuantity(), equalTo(4577L));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getQuantity(), equalTo(1386L));
assertThat(capitalConstructionPartsZydrineCalculationItem.getQuantity(), equalTo(244L));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getQuantity(), equalTo(96L));
assertThat(capitalPropulsionEngineCalculationItem.getParentQuantity(), equalTo(1L));
assertThat(capitalArmorPlateCalculationItem.getParentQuantity(), equalTo(1L));
assertThat(capitalCargoBayCalculationItem.getParentQuantity(), equalTo(1L));
assertThat(capitalConstructionPartsCalculationItem.getParentQuantity(), equalTo(1L));
assertThat(capitalCargoBayTritaniumCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalCargoBayPyeriteCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalCargoBayMexallonCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalCargoBayIsogenCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalCargoBayNocxiumCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalCargoBayZydrineCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalCargoBayMegacyteCalculationItem.getParentQuantity(), equalTo(84L));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalConstructionPartsMexallonCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalConstructionPartsIsogenCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalConstructionPartsZydrineCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getParentQuantity(), equalTo(53L));
assertThat(capitalPropulsionEngineCalculationItem.getTotalPrice(), equalTo(new BigDecimal("64000000.00")));
assertThat(capitalArmorPlateCalculationItem.getTotalPrice(), equalTo(new BigDecimal("63000000.00")));
assertThat(capitalCargoBayCalculationItem.getTotalPrice(), equalTo(new BigDecimal("248798512.20")));
assertThat(capitalConstructionPartsCalculationItem.getTotalPrice(), equalTo(new BigDecimal("143462254.47")));
assertThat(capitalCargoBayTritaniumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("1748054.00")));
assertThat(capitalCargoBayPyeriteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("196587.00")));
assertThat(capitalCargoBayMexallonCalculationItem.getTotalPrice(), equalTo(new BigDecimal("600231.75")));
assertThat(capitalCargoBayIsogenCalculationItem.getTotalPrice(), equalTo(new BigDecimal("162333.00")));
assertThat(capitalCargoBayNocxiumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("72480.00")));
assertThat(capitalCargoBayZydrineCalculationItem.getTotalPrice(), equalTo(new BigDecimal("130001.30")));
assertThat(capitalCargoBayMegacyteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("52200.00")));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("773456.20")));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("254778.00")));
assertThat(capitalConstructionPartsMexallonCalculationItem.getTotalPrice(), equalTo(new BigDecimal("917491.35")));
assertThat(capitalConstructionPartsIsogenCalculationItem.getTotalPrice(), equalTo(new BigDecimal("233427.00")));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("110880.00")));
assertThat(capitalConstructionPartsZydrineCalculationItem.getTotalPrice(), equalTo(new BigDecimal("244002.44")));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("172800.00")));
assertThat(capitalPropulsionEngineCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("64000000.00")));
assertThat(capitalArmorPlateCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("63000000.00")));
assertThat(capitalCargoBayCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("248798512.20")));
assertThat(capitalConstructionPartsCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("143462254.47")));
assertThat(capitalCargoBayTritaniumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("146836536.00")));
assertThat(capitalCargoBayPyeriteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("16513308.00")));
assertThat(capitalCargoBayMexallonCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("50419467.00")));
assertThat(capitalCargoBayIsogenCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("13635972.00")));
assertThat(capitalCargoBayNocxiumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("6088320.00")));
assertThat(capitalCargoBayZydrineCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("10920109.20")));
assertThat(capitalCargoBayMegacyteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("4384800.00")));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("40993178.60")));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("13503234.00")));
assertThat(capitalConstructionPartsMexallonCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("48627041.55")));
assertThat(capitalConstructionPartsIsogenCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("12371631.00")));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("5876640.00")));
assertThat(capitalConstructionPartsZydrineCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("12932129.32")));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("9158400.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(21009L).getQuantity(), equalTo(16L));
assertThat(typeIdToCalculationPriceSetItemMap.get(21017L).getQuantity(), equalTo(15L));
assertThat(typeIdToCalculationPriceSetItemMap.get(21027L), nullValue());
assertThat(typeIdToCalculationPriceSetItemMap.get(21037L), nullValue());
assertThat(typeIdToCalculationPriceSetItemMap.get(34L).getQuantity(), equalTo(85377143L));
assertThat(typeIdToCalculationPriceSetItemMap.get(35L).getQuantity(), equalTo(10005514L));
assertThat(typeIdToCalculationPriceSetItemMap.get(36L).getQuantity(), equalTo(3688883L));
assertThat(typeIdToCalculationPriceSetItemMap.get(37L).getQuantity(), equalTo(509953L));
assertThat(typeIdToCalculationPriceSetItemMap.get(38L).getQuantity(), equalTo(149562L));
assertThat(typeIdToCalculationPriceSetItemMap.get(39L).getQuantity(), equalTo(23852L));
assertThat(typeIdToCalculationPriceSetItemMap.get(40L).getQuantity(), equalTo(7524L));
assertThat(typeIdToCalculationPriceSetItemMap.get(21009L).getPrice(), equalTo(new BigDecimal("4000000.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(21017L).getPrice(), equalTo(new BigDecimal("4200000.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(34L).getPrice(), equalTo(new BigDecimal("2.20")));
assertThat(typeIdToCalculationPriceSetItemMap.get(35L).getPrice(), equalTo(new BigDecimal("3.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(36L).getPrice(), equalTo(new BigDecimal("26.85")));
assertThat(typeIdToCalculationPriceSetItemMap.get(37L).getPrice(), equalTo(new BigDecimal("51.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(38L).getPrice(), equalTo(new BigDecimal("80.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(39L).getPrice(), equalTo(new BigDecimal("1000.01")));
assertThat(typeIdToCalculationPriceSetItemMap.get(40L).getPrice(), equalTo(new BigDecimal("1800.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(21009L).getTotalPrice(), equalTo(new BigDecimal("64000000.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(21017L).getTotalPrice(), equalTo(new BigDecimal("63000000.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(34L).getTotalPrice(), equalTo(new BigDecimal("187829714.60")));
assertThat(typeIdToCalculationPriceSetItemMap.get(35L).getTotalPrice(), equalTo(new BigDecimal("30016542.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(36L).getTotalPrice(), equalTo(new BigDecimal("99046508.55")));
assertThat(typeIdToCalculationPriceSetItemMap.get(37L).getTotalPrice(), equalTo(new BigDecimal("26007603.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(38L).getTotalPrice(), equalTo(new BigDecimal("11964960.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(39L).getTotalPrice(), equalTo(new BigDecimal("23852238.52")));
assertThat(typeIdToCalculationPriceSetItemMap.get(40L).getTotalPrice(), equalTo(new BigDecimal("13543200.00")));
pricingProcessorResult = pricingProcessor.process(10L, calculationTree, new HashMap<Long, CalculationPriceSetItemDto>());
typeIdToCalculationPriceSetItemMap = pricingProcessorResult.getTypeIdToCalculationPriceSetItemMap();
assertThat(typeIdToCalculationPriceSetItemMap.size(), equalTo(9));
assertThat(pricingProcessorResult.getTotalPrice(), equalTo(new BigDecimal("5192607666.70")));
assertThat(capitalPropulsionEngineCalculationItem.getQuantity(), equalTo(16L));
assertThat(capitalArmorPlateCalculationItem.getQuantity(), equalTo(15L));
assertThat(capitalCargoBayCalculationItem.getQuantity(), equalTo(84L));
assertThat(capitalConstructionPartsCalculationItem.getQuantity(), equalTo(53L));
assertThat(capitalCargoBayTritaniumCalculationItem.getQuantity(), equalTo(794570L));
assertThat(capitalCargoBayPyeriteCalculationItem.getQuantity(), equalTo(65529L));
assertThat(capitalCargoBayMexallonCalculationItem.getQuantity(), equalTo(22355L));
assertThat(capitalCargoBayIsogenCalculationItem.getQuantity(), equalTo(3183L));
assertThat(capitalCargoBayNocxiumCalculationItem.getQuantity(), equalTo(906L));
assertThat(capitalCargoBayZydrineCalculationItem.getQuantity(), equalTo(130L));
assertThat(capitalCargoBayMegacyteCalculationItem.getQuantity(), equalTo(29L));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getQuantity(), equalTo(351571L));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getQuantity(), equalTo(84926L));
assertThat(capitalConstructionPartsMexallonCalculationItem.getQuantity(), equalTo(34171L));
assertThat(capitalConstructionPartsIsogenCalculationItem.getQuantity(), equalTo(4577L));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getQuantity(), equalTo(1386L));
assertThat(capitalConstructionPartsZydrineCalculationItem.getQuantity(), equalTo(244L));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getQuantity(), equalTo(96L));
assertThat(capitalPropulsionEngineCalculationItem.getParentQuantity(), equalTo(10L));
assertThat(capitalArmorPlateCalculationItem.getParentQuantity(), equalTo(10L));
assertThat(capitalCargoBayCalculationItem.getParentQuantity(), equalTo(10L));
assertThat(capitalConstructionPartsCalculationItem.getParentQuantity(), equalTo(10L));
assertThat(capitalCargoBayTritaniumCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalCargoBayPyeriteCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalCargoBayMexallonCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalCargoBayIsogenCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalCargoBayNocxiumCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalCargoBayZydrineCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalCargoBayMegacyteCalculationItem.getParentQuantity(), equalTo(840L));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalConstructionPartsMexallonCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalConstructionPartsIsogenCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalConstructionPartsZydrineCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getParentQuantity(), equalTo(530L));
assertThat(capitalPropulsionEngineCalculationItem.getTotalPrice(), equalTo(new BigDecimal("64000000.00")));
assertThat(capitalArmorPlateCalculationItem.getTotalPrice(), equalTo(new BigDecimal("63000000.00")));
assertThat(capitalCargoBayCalculationItem.getTotalPrice(), equalTo(new BigDecimal("248798512.20")));
assertThat(capitalConstructionPartsCalculationItem.getTotalPrice(), equalTo(new BigDecimal("143462254.47")));
assertThat(capitalCargoBayTritaniumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("1748054.00")));
assertThat(capitalCargoBayPyeriteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("196587.00")));
assertThat(capitalCargoBayMexallonCalculationItem.getTotalPrice(), equalTo(new BigDecimal("600231.75")));
assertThat(capitalCargoBayIsogenCalculationItem.getTotalPrice(), equalTo(new BigDecimal("162333.00")));
assertThat(capitalCargoBayNocxiumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("72480.00")));
assertThat(capitalCargoBayZydrineCalculationItem.getTotalPrice(), equalTo(new BigDecimal("130001.30")));
assertThat(capitalCargoBayMegacyteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("52200.00")));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("773456.20")));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("254778.00")));
assertThat(capitalConstructionPartsMexallonCalculationItem.getTotalPrice(), equalTo(new BigDecimal("917491.35")));
assertThat(capitalConstructionPartsIsogenCalculationItem.getTotalPrice(), equalTo(new BigDecimal("233427.00")));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getTotalPrice(), equalTo(new BigDecimal("110880.00")));
assertThat(capitalConstructionPartsZydrineCalculationItem.getTotalPrice(), equalTo(new BigDecimal("244002.44")));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getTotalPrice(), equalTo(new BigDecimal("172800.00")));
assertThat(capitalPropulsionEngineCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("640000000.00")));
assertThat(capitalArmorPlateCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("630000000.00")));
assertThat(capitalCargoBayCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("2487985122.00")));
assertThat(capitalConstructionPartsCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("1434622544.70")));
assertThat(capitalCargoBayTritaniumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("1468365360.00")));
assertThat(capitalCargoBayPyeriteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("165133080.00")));
assertThat(capitalCargoBayMexallonCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("504194670.00")));
assertThat(capitalCargoBayIsogenCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("136359720.00")));
assertThat(capitalCargoBayNocxiumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("60883200.00")));
assertThat(capitalCargoBayZydrineCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("109201092.00")));
assertThat(capitalCargoBayMegacyteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("43848000.00")));
assertThat(capitalConstructionPartsTritaniumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("409931786.00")));
assertThat(capitalConstructionPartsPyeriteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("135032340.00")));
assertThat(capitalConstructionPartsMexallonCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("486270415.50")));
assertThat(capitalConstructionPartsIsogenCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("123716310.00")));
assertThat(capitalConstructionPartsNocxiumCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("58766400.00")));
assertThat(capitalConstructionPartsZydrineCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("129321293.20")));
assertThat(capitalConstructionPartsMegacyteCalculationItem.getTotalPriceForParent(), equalTo(new BigDecimal("91584000.00")));
assertThat(typeIdToCalculationPriceSetItemMap.get(21009L).getQuantity(), equalTo(160L));
assertThat(typeIdToCalculationPriceSetItemMap.get(21017L).getQuantity(), equalTo(150L));
assertThat(typeIdToCalculationPriceSetItemMap.get(21027L), nullValue());
assertThat(typeIdToCalculationPriceSetItemMap.get(21037L), nullValue());
assertThat(typeIdToCalculationPriceSetItemMap.get(34L).getQuantity(), equalTo(853771430L));