@Test public void testMessageWithObjectArrayPayload() throws Exception { assertFalse(CloneHelper.needsCloning(new Message().withPayload(new Object[]{ 1337L, "string" }))); assertTrue(CloneHelper.needsCloning(new Message().withPayload(new Object[]{ new ImmutableClass("huuhaa"), new MutableClass() }))); assertFalse(CloneHelper.needsCloning(new Message().withPayload(new Object[]{ new ImmutableClass("huuhaa"), new ImmutableClass("huuhaa") }))); assertFalse(CloneHelper.needsCloning(new Message().withPayload(new Object[]{ CloneHelperTest.ImmutableEnum.TEST }))); }
public static boolean needsCloning(Object object) { if (object == null) { return false; } if (object instanceof Message) { return needsCloning((Message) object); } return !isObjectConsideredImmutable(object); }
CloneHelper { public static boolean needsCloning(Object object) { if (object == null) { return false; } if (object instanceof Message) { return needsCloning((Message) object); } return !isObjectConsideredImmutable(object); } }
CloneHelper { public static boolean needsCloning(Object object) { if (object == null) { return false; } if (object instanceof Message) { return needsCloning((Message) object); } return !isObjectConsideredImmutable(object); }  }
CloneHelper { public static boolean needsCloning(Object object) { if (object == null) { return false; } if (object instanceof Message) { return needsCloning((Message) object); } return !isObjectConsideredImmutable(object); }  static boolean needsCloning(Object object); }
CloneHelper { public static boolean needsCloning(Object object) { if (object == null) { return false; } if (object instanceof Message) { return needsCloning((Message) object); } return !isObjectConsideredImmutable(object); }  static boolean needsCloning(Object object);  }