### Question:
EfficientStringUtils { public static boolean endsWith(final String src, final String... suffixes) { int pos = src.length(); for (int i = suffixes.length - 1; i >= 0; i--) { final String suffix = suffixes[i]; pos -= suffix.length(); if (!src.startsWith(suffix, pos)) { return false; } } return true; }  static boolean endsWith(final String src, final String... suffixes);  }### Answer:
@Test public void testEndsWith() { assertTrue(endsWith("abc", "c")); assertTrue(endsWith("foo.xml", ".", "xml")); assertTrue(endsWith("foo", "foo")); }
@Test public void testEndsWithEmptySuffixes() { assertTrue(endsWith("foo", "")); assertTrue(endsWith("", "")); assertTrue(endsWith("foo")); assertTrue(endsWith("")); }
@Test public void testEndsWithNoMatchingSuffix() { assertFalse(endsWith("foo", "ooo")); assertFalse(endsWith("foo.xml", ".")); }