DateConverter { public Model getTodayNepaliDate() { return getNepaliDate(Calendar.getInstance().get(Calendar.YEAR), Calendar.getInstance().get(Calendar.MONTH) + 1, Calendar.getInstance().get(Calendar.DAY_OF_MONTH)); } DateConverter(); Model getEnglishDate(@IntRange(from = 1970, to = 2090) int nepYY,
                                @IntRange(from = 1, to = 12) int nepMM,
                                @IntRange(from = 1, to = 32) int nepDD); @SuppressWarnings("unused") Calendar getEnglishDate(Model date); Model getNepaliDate(@IntRange(from = 1913 - 2033) int engYY,
                               @IntRange(from = 1, to = 12) int engMM,
                               @IntRange(from = 1, to = 31) int engDD); @SuppressWarnings("unused") Model getNepaliDate(Calendar date); @Contract(pure = true) static int getNepaliMonthString(@IntRange(from = 0, to = 11) int month); int getFirstWeekDayMonth(@IntRange(from = 1970, to = 2090) int yy, @IntRange(from = 1, to = 12) int mm); int noOfDaysInMonth(@IntRange(from = 1970, to = 2090) int yy, @IntRange(from = 1, to = 12) int mm); int getWeekDay(@IntRange(from = 1970, to = 2090) int yy, @IntRange(from = 1, to = 12) int mm, @IntRange(from = 1, to = 32) int dd); Model getTodayNepaliDate(); @SuppressWarnings("unused") static Calendar convertModelToCalendar(Model tempModel); @SuppressWarnings("unused") static Model convertCalendarToModel(Calendar date); static ArrayList<Model> getAllSaturdays();  }
@Test public void getTodayNepaliDate() { Model todayNepaliDate = dc.getTodayNepaliDate(); Calendar todayCalendar = Calendar.getInstance(); Model nepaliDate = dc.getNepaliDate(todayCalendar); assertThat(nepaliDate.getDay(), is(todayNepaliDate.getDay())); assertThat(nepaliDate.getMonth(), is(todayNepaliDate.getMonth())); assertThat(nepaliDate.getYear(), is(todayNepaliDate.getYear())); }