### Question:
PriceModellerClient { public double getAppTotalCharges(int deploymentId, int schemeID, double iaaSCharges) { try { return priceModeller.getAppTotalCharges(deploymentId, schemeID, iaaSCharges); } catch(Exception ex) { logger.warn("Error getting the reploy from the PaaS PM"); logger.warn(ex.getMessage()); logger.warn(ex.getStackTrace()); return -1.0; } } private  PriceModellerClient(); static PriceModellerClient getInstance(); void initializeApplication(String applicationId, int deploymentId, int schemeId); void initializeApplication(String applicationName, int deploymentId, LinkedList<VMinfo> vms); double getAppPredictedCharges(int deploymentId, int schemeID, double iaaSCharges); double getAppPredictedPrice(int deploymentId, int schemeID, double iaaSCharges, long duration); double getAppTotalCharges(int deploymentId, int schemeID, double iaaSCharges); double getEventPredictedCharges(int deploymentId, 
			                               int cpu, 
			                               int ram, 
			                               double storage, 
			                               double energy, 
			                               int schemeId, 
			                               long duration, 
			                               int numberOfevents); double getEventPredictedChargesOfApp(int deplID, LinkedList<VMinfo> vms, double energy,int schemeId); double predictPriceForNextPeriod(int deplID, double duration); double predictPriceForNextHour(int depId, LinkedList<VMinfo> vms);  }### Answer:
@Test public void getAppTotalCharges() throws Exception { when(ppm.getAppTotalCharges(111, 4, 3.4)).thenReturn(6.2); double charges = pmc.getAppTotalCharges(111, 4, 3.4); assertEquals(6.2, charges, 0.000001); }