function assertDateEquals(expectYear, expectMonth, expectDate, date) {
  if (expectYear !== undefined) {
    assertEquals(expectYear, date.getFullYear());
  }
  assertEquals(expectMonth, date.getMonth());
  if (expectDate !== undefined) {
    assertEquals(expectDate, date.getDate());
  }
}
Asserts that `date` has the expected date field values.
@param {number|undefined} expectYear
@param {number} expectMonth
@param {number|undefined} expectDate
@param {!DateLike} date