@Test public void text_is_not_shortend_when_max_smaller_than_1() { assertEquals("I am full here", sanitizerToTest.sanitize("I am full here", -1)); assertEquals("I am full here", sanitizerToTest.sanitize("I am full here", 0)); assertEquals("I am full here", sanitizerToTest.sanitize("I am full here", -3331)); }
public String sanitize(Object maybeContaminated, int maxLength) { String objAsString = null; if (maybeContaminated!=null) { objAsString = maybeContaminated.toString(); } return sanitize(objAsString, maxLength); }
LogSanitizer { public String sanitize(Object maybeContaminated, int maxLength) { String objAsString = null; if (maybeContaminated!=null) { objAsString = maybeContaminated.toString(); } return sanitize(objAsString, maxLength); } }
LogSanitizer { public String sanitize(Object maybeContaminated, int maxLength) { String objAsString = null; if (maybeContaminated!=null) { objAsString = maybeContaminated.toString(); } return sanitize(objAsString, maxLength); }  }
LogSanitizer { public String sanitize(Object maybeContaminated, int maxLength) { String objAsString = null; if (maybeContaminated!=null) { objAsString = maybeContaminated.toString(); } return sanitize(objAsString, maxLength); }  String sanitize(Object maybeContaminated, int maxLength); String sanitize(String maybeContaminated, int maxLength); }
LogSanitizer { public String sanitize(Object maybeContaminated, int maxLength) { String objAsString = null; if (maybeContaminated!=null) { objAsString = maybeContaminated.toString(); } return sanitize(objAsString, maxLength); }  String sanitize(Object maybeContaminated, int maxLength); String sanitize(String maybeContaminated, int maxLength);  }