### Question:
Timestamps { public static long floorYYYY(long micros) { int y; return yearMicros(y = getYear(micros), isLeapYear(y)); } private  Timestamps(); static long addDays(long micros, int days); static long addHours(long micros, int hours); static long addMinutes(long micros, int minutes); static long addMonths(final long micros, int months); static long addPeriod(long lo, char type, int period); static long addSeconds(long micros, int seconds); static long addWeeks(long micros, int weeks); static long addYear(long micros, int years); static long ceilDD(long micros); static long ceilMM(long micros); static long ceilYYYY(long micros); static long endOfYear(int year); static long floorDD(long micros); static long floorHH(long micros); static long floorMI(long micros); static long floorMM(long micros); static long floorYYYY(long micros); static int getDayOfMonth(long micros, int year, int month, boolean leap); static int getDayOfWeek(long micros); static int getDayOfWeekSundayFirst(long micros); static long getDaysBetween(long a, long b); static long getWeeksBetween(long a, long b); static long getMicrosBetween(long a, long b); static long getMillisBetween(long a, long b); static long getSecondsBetween(long a, long b); static long getMinutesBetween(long a, long b); static long getHoursBetween(long a, long b); static long getPeriodBetween(char type, long start, long end); static int getDaysPerMonth(int m, boolean leap); static int getHourOfDay0(long micros); static int getHourOfDay(long micros); static int getMicrosOfSecond(long micros); static int getMillisOfSecond(long micros); static int getMinuteOfHour(long micros); static int getMonthOfYear(long micros, int year, boolean leap); static long getMonthsBetween(long a, long b); static int getSecondOfMinute(long micros); static int getYear(long micros); static long getYearsBetween(long a, long b); static boolean isLeapYear(int year); static long monthOfYearMicros(int month, boolean leap); static long nextOrSameDayOfWeek(long millis, int dow); static long parseOffset(CharSequence in, int lo, int hi); static long previousOrSameDayOfWeek(long micros, int dow); static long toMicros(int y, int m, int d, int h, int mi); static long toMicros(int y, boolean leap, int m, int d, int h, int mi); static String toString(long micros); static long yearMicros(int year, boolean leap); static final long WEEK_MICROS; static final long DAY_MICROS; static final long HOUR_MICROS; static final long MINUTE_MICROS; static final long SECOND_MICROS; static final int SECOND_MILLIS; static final int MILLI_MICROS; static final int STATE_INIT; static final int STATE_UTC; static final int STATE_GMT; static final int STATE_HOUR; static final int STATE_DELIM; static final int STATE_MINUTE; static final int STATE_END; static final int STATE_SIGN; static final TimestampFloorMethod FLOOR_DD; static final TimestampAddMethod ADD_DD; static final TimestampFloorMethod FLOOR_YYYY; static final TimestampFloorMethod FLOOR_MM; static final TimestampAddMethod ADD_MM; static final TimestampAddMethod ADD_YYYY; }### Answer:
@Test public void testFloorYYYY() throws Exception { long micros = TimestampFormatUtils.parseDateTime("2008-05-12T23:45:51.045Z"); TimestampFormatUtils.appendDateTime(sink, Timestamps.floorYYYY(micros)); TestUtils.assertEquals("2008-01-01T00:00:00.000Z", sink); }