### Question:
CommonUtil { public static Integer determinePriceCat(double price, TargetingChannel.PriceModel priceModel) { if (price < 0) { return 0; } if (priceModel == TargetingChannel.PriceModel.CPM) { return determinePriceCatForCPM(price); } else if (priceModel == TargetingChannel.PriceModel.CPC) { return determinePriceCatForCPC(price); } else if (priceModel == TargetingChannel.PriceModel.CPD) { return determinePriceCatForCPD(price); } else if (priceModel == TargetingChannel.PriceModel.CPT) { return determinePriceCatForCPT(price); } return 3; } private  CommonUtil(); static boolean isEmpty(List list); static boolean isBlank(String str); static String sanitize(String v); static String DateToDayString(Date date); static Date dayToDate(String day); static String convertToString(List<String> list); static Map convertToMap(Object object); static List<String> removeStringFromItems(List<String> list, String toRemove); static Integer determinePriceCatForCPM(double price); static Integer determinePriceCatForCPC(double price); static Integer determinePriceCatForCPD(double price); static Integer determinePriceCatForCPT(double price); static Integer determinePriceCat(double price, TargetingChannel.PriceModel priceModel); static String removeEscapingCharacters(String str); static boolean equalNumbers(double d1, double d2);  }### Answer:
@Test public void determinePriceCat() { double p0 = 0.1, p1 = -2; TargetingChannel tcp1 = new TargetingChannel(); tcp1.setPm("CPC"); assertEquals(1, (int) CommonUtil.determinePriceCat(p0, tcp1.getPm())); assertEquals(0, (int) CommonUtil.determinePriceCat(p1, tcp1.getPm())); assertEquals(2, (int) CommonUtil.determinePriceCat(0.70001, tcp1.getPm())); assertEquals(3, (int) CommonUtil.determinePriceCat(10D, tcp1.getPm())); tcp1.setPm("CPM"); assertEquals(1, (int) CommonUtil.determinePriceCat(p0, tcp1.getPm())); assertEquals(2, (int) CommonUtil.determinePriceCat(12.0001, tcp1.getPm())); assertEquals(3, (int) CommonUtil.determinePriceCat(25.0001, tcp1.getPm())); tcp1.setPm("CPD"); assertEquals(1, (int) CommonUtil.determinePriceCat(p0, tcp1.getPm())); assertEquals(2, (int) CommonUtil.determinePriceCat(5D, tcp1.getPm())); assertEquals(3, (int) CommonUtil.determinePriceCat(100D, tcp1.getPm())); tcp1.setPm("CPT"); assertEquals(1, (int) CommonUtil.determinePriceCat(p0, tcp1.getPm())); assertEquals(2, (int) CommonUtil.determinePriceCat(300000D, tcp1.getPm())); assertEquals(0, (int) CommonUtil.determinePriceCat(p1, tcp1.getPm())); assertEquals(3, (int) CommonUtil.determinePriceCat(400005D, tcp1.getPm())); tcp1.setPm("NONE"); assertEquals(3, (int) CommonUtil.determinePriceCat(p0, tcp1.getPm())); assertEquals(0, (int) CommonUtil.determinePriceCat(p1, tcp1.getPm())); }