2020
2121import static io .microsphere .util .ValueHolder .of ;
2222import static org .junit .jupiter .api .Assertions .assertEquals ;
23+ import static org .junit .jupiter .api .Assertions .assertNotEquals ;
2324import static org .junit .jupiter .api .Assertions .assertNull ;
2425
2526/**
@@ -56,14 +57,14 @@ public void testSetValue() {
5657
5758 @ Test
5859 public void testGetValue () {
59- ValueHolder valueHolder = ValueHolder . of ("initial value" );
60+ ValueHolder valueHolder = of ("initial value" );
6061 // Assert that the value is equal to the initial value
6162 assertEquals ("initial value" , valueHolder .getValue ());
6263 }
6364
6465 @ Test
6566 public void testReset () {
66- ValueHolder valueHolder = ValueHolder . of (1 );
67+ ValueHolder valueHolder = of (1 );
6768 valueHolder .reset ();
6869 assertNull (valueHolder .getValue ());
6970 }
@@ -77,7 +78,10 @@ public void testToString() {
7778
7879 @ Test
7980 public void testEquals () {
80- assertEquals (of (1 ), of (1 ));
81+ ValueHolder valueHolder = of (1 );
82+ assertEquals (valueHolder , valueHolder );
83+ assertNotEquals (1 , valueHolder );
84+ assertEquals (of (1 ), valueHolder );
8185 assertEquals (of ("A" ), of ("A" ));
8286 assertEquals (of (null ), of (null ));
8387 }
0 commit comments