PresentValueBlackBondFuturesCubeSensitivity { public PresentValueBlackBondFuturesCubeSensitivity plus(final PresentValueBlackBondFuturesCubeSensitivity sensi) { ArgumentChecker.isTrue(_currency.equals(sensi._currency), "Swap generators should be equal to add sensitivities"); return new PresentValueBlackBondFuturesCubeSensitivity(CubeValue.plus(_sensitivity, sensi._sensitivity), _currency, _legalEntity); } PresentValueBlackBondFuturesCubeSensitivity(final Currency currency, final LegalEntity legalEntity);  PresentValueBlackBondFuturesCubeSensitivity(final Map<Triple<Double, Double, Double>, Double> sensitivity,
      final Currency currency, final LegalEntity legalEntity);  PresentValueBlackBondFuturesCubeSensitivity(final CubeValue sensitivity,
      final Currency currency, final LegalEntity legalEntity); void addSensitivity(final Triple<Double, Double, Double> expiryDelayStrike, final double sensitivity); PresentValueBlackBondFuturesCubeSensitivity multipliedBy(final double factor); PresentValueBlackBondFuturesCubeSensitivity plus(final PresentValueBlackBondFuturesCubeSensitivity sensi); CubeValue getSensitivity(); Currency getCurrency(); LegalEntity getLegalEntiry(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void plus() { final CubeValue cube1 = new CubeValue(); cube1.getMap().putAll(CUBE_VAL.getMap()); PresentValueBlackBondFuturesCubeSensitivity sensi1 = new PresentValueBlackBondFuturesCubeSensitivity(cube1.getMap(), CCY, LEGAL_ENTITY_GERMANY); final Triple<Double, Double, Double> POINT = Triple.of(0.75, 0.25, 1.10); final double value = 5555.5; final CubeValue cube2 = new CubeValue(); cube2.add(POINT, value); final PresentValueBlackBondFuturesCubeSensitivity sensi2 = new PresentValueBlackBondFuturesCubeSensitivity(cube2.getMap(), CCY, LEGAL_ENTITY_GERMANY); final PresentValueBlackBondFuturesCubeSensitivity sensi3 = sensi1.plus(sensi2); assertEquals("PresentValueBlackBondFuturesCubeSensitivity: add", CubeValue.plus(sensi1.getSensitivity(), sensi2.getSensitivity()), sensi3.getSensitivity()); assertEquals("PresentValueBlackBondFuturesCubeSensitivity: add", sensi1.getSensitivity(), cube1); }