@Test
public void testEquals() {

  assertEquals("Leading or trailing whitespace in the flavor type should be trimmed",
          flavor(" \r \n \t type \t \n \r ", "subtype"), flavor("type", "subtype"));
  assertEquals("Leading or trailing whitespace in the flavor subtype should be ignored",
          flavor("type", " \r \n \t subtype \t \n \r "), flavor("type", "subtype"));
  assertEquals("Leading or trailing whitespace in both the flavor type and subtype should be trimmed",
          flavor(" \r \n \t type \t \n \r ", " \r \n \t subtype \t \n \r "), flavor("type", "subtype"));
  assertEquals("Flavor type should be case-insensitive", flavor("TYPE", "subtype"), flavor("type", "subtype"));
  assertEquals("Flavor type should be case-insensitive", flavor("type", "SUBTYPE"), flavor("type", "subtype"));
  assertEquals("Flavor parts should be case-insensitive", flavor("TYPE", "SUBTYPE"), flavor("type", "subtype"));
}