### Question:
Utility { public static String stripNewLines(String multiLineString) { return multiLineString.replaceAll("[\\r\\n]", ""); }  static boolean arrayContains(Object[] a, Object o); static boolean isAnyMimeType(String o, String... a); static boolean arrayContainsAny(Object[] a, Object... o); static String combine(Object[] parts, char separator); static String combine(Iterable<?> parts, char separator); static boolean requiredFieldValid(TextView view); static boolean requiredFieldValid(Editable s); static boolean domainFieldValid(EditText view); static void setCompoundDrawablesAlpha(TextView view, int alpha); static String wrap(String str, int wrapLength); static String wrap(String str, int wrapLength, String newLineStr, boolean wrapLongWords); static String stripSubject(final String subject); static String stripNewLines(String multiLineString); static boolean hasExternalImages(final String message); static void closeQuietly(final Cursor cursor); static boolean hasConnectivity(final Context context); static List<String> extractMessageIds(final String text); static String extractMessageId(final String text); static Handler getMainThreadHandler(); static void setContactForBadge(ContactBadge contactBadge,
                                          Address address);  }### Answer:
@Test public void stripNewLines_removesLeadingCarriageReturns() { String result = Utility.stripNewLines("\r\rTest"); assertEquals("Test", result); }
@Test public void stripNewLines_removesLeadingLineFeeds() { String result = Utility.stripNewLines("\n\nTest\n\n"); assertEquals("Test", result); }
@Test public void stripNewLines_removesTrailingCarriageReturns() { String result = Utility.stripNewLines("Test\r\r"); assertEquals("Test", result); }
@Test public void stripNewLines_removesMidCarriageReturns() { String result = Utility.stripNewLines("Test\rTest"); assertEquals("TestTest", result); }
@Test public void stripNewLines_removesMidLineFeeds() { String result = Utility.stripNewLines("Test\nTest"); assertEquals("TestTest", result); }