### Question:
TumorPowerCalculator { public double cachedPowerCalculation(final int numReads, final double alleleFraction) { PowerCacheKey key = new PowerCacheKey(numReads, alleleFraction); Double power = cache.get(key); if (power == null) { try { power = calculatePower(numReads, alleleFraction); } catch (final Exception ex) { throw new GATKException("Power calculation failed", ex); } cache.put(key, power); } return power; } TumorPowerCalculator(double errorProbability, double constantLodThreshold, double contamination);  TumorPowerCalculator(double errorProbability, double tumorLODThreshold, double contamination, boolean enableSmoothing); double cachedPowerCalculation(final int numReads, final double alleleFraction);  }### Answer:
@Test public void testCachedPowerCalculation() throws Exception { TumorPowerCalculator tpc = new TumorPowerCalculator(0.001, 2.0, 0.0); final double epsilon = 0.0001; assertTrue(closeEnough(tpc.cachedPowerCalculation(100,0.2), 1.0, epsilon)); assertTrue(closeEnough(tpc.cachedPowerCalculation(30,0.1), 0.8864, epsilon)); assertTrue(closeEnough(tpc.cachedPowerCalculation(0,0.02), 0.0, epsilon)); assertTrue(closeEnough(tpc.cachedPowerCalculation(5, 0.01), 0.0520, epsilon)); }