### Question:
JobHistoryFileParserBase implements JobHistoryFileParser { public static double calculateJobCost(long mbMillis, double computeTco, long machineMemory) { if ((machineMemory == 0L) || (computeTco == 0.0)) { LOG.error("Unable to calculate job cost since machineMemory " + machineMemory + " or computeTco " + computeTco + " is 0; returning jobCost as 0"); return 0.0; } double jobCost = (mbMillis * computeTco) / (Constants.MILLIS_ONE_DAY * machineMemory); return jobCost; } protected  JobHistoryFileParserBase(Configuration conf); Put getHadoopVersionPut(HadoopVersion historyFileVersion, byte[] jobKeyBytes); static long getXmxValue(String javaChildOptsStr); static long getXmxTotal(final long xmx75); static long getSubmitTimeMillisFromJobHistory(byte[] jobHistoryRaw); static double calculateJobCost(long mbMillis, double computeTco, long machineMemory);  }### Answer:
@Test public void testCostDefault() { Double jobCost = JobHistoryFileParserBase.calculateJobCost(100L, 0.0, 0L); assertEquals(0.0, jobCost, 0.0001); jobCost = JobHistoryFileParserBase.calculateJobCost(100L, 20.0, 512L); assertEquals(1.413850E-10, jobCost, 0.0001); }