1
2
3
4
5
6
7
8
9
10
11 package org.mule.util;
12
13 import org.mule.tck.AbstractMuleTestCase;
14
15 public class ObjectUtilsTestCase extends AbstractMuleTestCase
16 {
17
18 public void testIdentityToShortString()
19 {
20 assertEquals("null", ObjectUtils.identityToShortString(null));
21
22 String source = "foo";
23 String description = ObjectUtils.identityToShortString(source);
24 String[] components = StringUtils.split(description, '@');
25
26 assertNotNull(components);
27 assertEquals(2, components.length);
28 assertEquals("String", components[0]);
29 assertEquals(Integer.toHexString(System.identityHashCode(source)), components[1]);
30 }
31
32 }