Index: test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java (revision 453576) +++ test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java (working copy) @@ -131,7 +131,7 @@ Method m = SampleListener.class.getMethod("fireSampleEvent", new Class[] { SampleEvent.class }); - handler.invoke(proxy, m, null); + handler.invoke(proxy, m, new Object[] {new SampleEvent("")}); assertEquals(invocationObject, handler.getTarget()); assertEquals("doSomething", getMethodName()); @@ -227,10 +227,10 @@ * */ public static Test suite() { - // TestSuite suite = new TestSuite(); - // suite.addTest(new - // EventHandlerTest("testCreateForStaticMethodAsPropertyGetter")); - // return suite; +// TestSuite suite = new TestSuite(); +// +// suite.addTest(new EventHandlerTest("testInvokeWithNullPropertyName")); +// return suite; return new TestSuite(EventHandlerTest.class); } @@ -423,8 +423,8 @@ String newLabel = "New Value: set text."; try { button.setLabel(newLabel); - fail("Should throw NullPointerException."); - } catch (NullPointerException e) { + fail("Should throw RuntimeException."); + } catch (RuntimeException e) { } } @@ -463,7 +463,7 @@ try { button.setLabel(newLabel); fail("Should throw NullPointerException."); - } catch (NullPointerException e) { + } catch (RuntimeException e) { } } @@ -506,10 +506,10 @@ public void testCreateClassObjectStringStringString_ClassInvalid() { MockTarget target = new MockTarget(); try { - EventHandler.create(Serializable.class, target, "text", + EventHandler.create(String.class, target, "text", "source.label", "propertyChange"); - fail("Should throw ClassCastException."); - } catch (ClassCastException e) { + fail("Should throw IllegalArgumentException."); + } catch (IllegalArgumentException e) { } } @@ -560,8 +560,8 @@ String newLabel = "New Value: set text."; try { button.setLabel(newLabel); - fail("Should throw NullPointerException."); - } catch (NullPointerException e) { + fail("Should throw RuntimeException."); + } catch (RuntimeException e) { } } @@ -600,8 +600,8 @@ String newLabel = "New Value: set text."; try { button.setLabel(newLabel); - fail("Should throw NullPointerException."); - } catch (NullPointerException e) { + fail("Should throw RuntimeException."); + } catch (RuntimeException e) { } } @@ -751,8 +751,8 @@ String newLabel = "New Value: set text."; try { button.setLabel(newLabel); - fail("Should throw NullPointerException."); - } catch (NullPointerException e) { + fail("Should throw RuntimeException."); + } catch (RuntimeException e) { } } @@ -768,8 +768,8 @@ String newLabel = "New Value: set text."; try { button.setLabel(newLabel); - fail("Should throw NullPointerException."); - } catch (NullPointerException e) { + fail("Should throw RuntimeException."); + } catch (RuntimeException e) { } }