@Test public void object_with_to_string_containing_aaa_max_2_will_be_sanitized_to_aa() { assertEquals("aa", sanitizerToTest.sanitize(new TestLogObject("aaa"), 2)); }
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);  }