### Question:
BookingBucket implements Comparable { @Override public int compareTo(Object o) { BookingBucket bb = (BookingBucket) o; return bb.priority.compareTo(this.priority); } BookingBucket();  BookingBucket(String day, String bookingId, List<String> previousBookingOrder, int priority);  BookingBucket(String id, Map source); static BookingBucket clone(BookingBucket bb); String getId(); String getDay(); Integer getPriority(); Map<String, Double> getAllocatedAmounts(); @JsonIgnore double getSumOfAllocatedAmounts(); @Override int compareTo(Object o); Map<String, List<Double>> getAvgTbrMap(); void setAvgTbrMap(Map<String, List<Double>> avgTbrMap); List<String> getAndBookingsIds(); List<String> getMinusBookingsIds(); AvrTBRInsight getAvrTBRInsight(Set<String> validBookingIds);  }### Answer:
@Test public void compareTo() { String day = "20180105", bookingId = "test_bkid_1"; List<String> prvBkOrder = new ArrayList(); BookingBucket bb1 = new BookingBucket(day, bookingId, prvBkOrder, 1); String day2 = "20180105", bookingId2 = "test_bkid_2"; List<String> prvBkOrder2 = new ArrayList(); BookingBucket bb2 = new BookingBucket(day2, bookingId2, prvBkOrder2, 2); assertEquals(1, bb1.compareTo(bb2), 0); }