/*
 * $Id$
 *
 * Copyright 2007 Sun Microsystems, Inc., 4150 Network Circle,
 * Santa Clara, California 95054, U.S.A. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
package org.jdesktop.swingx.plaf;

import junit.framework.TestCase;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/**
 * This test ensures that all values that should be {@code UIResouce}s are.
 * 
 * @author Karl George Schaefer
 */
public class DefaultsListTest {
    /**
     * Ensure that "adding" a key with a {@code null} value removes the value
     * from the list.
     */
    @Test
    public void testRemoval() {
        DefaultsList kvList = new DefaultsList();
        kvList.add("a", "b");
        
        Object[] arr = kvList.toArray();
        assertEquals(2, arr.length);
        assertEquals("a", arr[0]);
        assertEquals("b", arr[1]);
        
        kvList.add("a", null);
        assertEquals(0, kvList.toArray().length);
    }
}

@@ -924,56 +924,43 @@
 ort 
-junit.framework.TestCase;%0A%0Aimport org.junit.Test
+static org.hamcrest.CoreMatchers.is
 ;%0Aim
@@ -956,32 +956,39 @@
 hers.is;%0Aimport 
+static 
 org.junit.runner
@@ -985,23 +985,27 @@
 nit.
-runner.RunWith;
+Assert.assertThat;%0A
 %0Aimp
@@ -1022,22 +1022,12 @@
 nit.
-runners.JUnit4
+Test
 ;%0A%0A/
@@ -1145,16 +1145,41 @@
 fer%0A */%0A
+@SuppressWarnings(%22nls%22)%0A
 public c
@@ -1508,18 +1508,13 @@
 sert
-Equals(2, 
+That(
 arr.
@@ -1515,24 +1515,31 @@
 t(arr.length
+, is(2)
 );%0A        a
@@ -1547,61 +1547,83 @@
 sert
-Equals(%22a%22, arr%5B0%5D);%0A        assertEquals(%22b%22, arr%5B1%5D
+That((String) arr%5B0%5D, is(%22a%22));%0A        assertThat((String) arr%5B1%5D, is(%22b%22)
 );%0A 
@@ -1679,18 +1679,13 @@
 sert
-Equals(0, 
+That(
 kvLi
@@ -1703,16 +1703,23 @@
 ).length
+, is(0)
 );%0A    %7D

Complete update to JUnit 4.