diff --git a/smack-core/src/test/java/org/jivesoftware/smack/filter/FromMatchesFilterTest.java b/smack-core/src/test/java/org/jivesoftware/smack/filter/FromMatchesFilterTest.java index 7171b145f..406375579 100644 --- a/smack-core/src/test/java/org/jivesoftware/smack/filter/FromMatchesFilterTest.java +++ b/smack-core/src/test/java/org/jivesoftware/smack/filter/FromMatchesFilterTest.java @@ -19,6 +19,7 @@ package org.jivesoftware.smack.filter; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; +import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Stanza; import org.junit.Test; import org.jxmpp.jid.EntityFullJid; @@ -46,10 +47,7 @@ public class FromMatchesFilterTest { public void autoCompareMatchingEntityFullJid() { FromMatchesFilter filter = FromMatchesFilter.create(FULL_JID1_R1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(FULL_JID1_R1); assertTrue(filter.accept(packet)); @@ -74,10 +72,7 @@ public class FromMatchesFilterTest { public void autoCompareMatchingBaseJid() { FromMatchesFilter filter = FromMatchesFilter.create(BASE_JID1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(BASE_JID1); assertTrue(filter.accept(packet)); @@ -102,10 +97,7 @@ public class FromMatchesFilterTest { public void autoCompareMatchingServiceJid() { FromMatchesFilter filter = FromMatchesFilter.create(SERVICE_JID1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(SERVICE_JID1); assertTrue(filter.accept(packet)); @@ -127,10 +119,7 @@ public class FromMatchesFilterTest { public void bareCompareMatchingEntityFullJid() { FromMatchesFilter filter = FromMatchesFilter.createBare(FULL_JID1_R1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(BASE_JID1); assertTrue(filter.accept(packet)); @@ -155,10 +144,7 @@ public class FromMatchesFilterTest { public void bareCompareMatchingBaseJid() { FromMatchesFilter filter = FromMatchesFilter.createBare(BASE_JID1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(BASE_JID1); assertTrue(filter.accept(packet)); @@ -183,10 +169,7 @@ public class FromMatchesFilterTest { public void bareCompareMatchingServiceJid() { FromMatchesFilter filter = FromMatchesFilter.createBare(SERVICE_JID1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(SERVICE_JID1); assertTrue(filter.accept(packet)); @@ -208,10 +191,7 @@ public class FromMatchesFilterTest { public void fullCompareMatchingEntityFullJid() { FromMatchesFilter filter = FromMatchesFilter.createFull(FULL_JID1_R1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(FULL_JID1_R1); assertTrue(filter.accept(packet)); @@ -236,10 +216,7 @@ public class FromMatchesFilterTest { public void fullCompareMatchingBaseJid() { FromMatchesFilter filter = FromMatchesFilter.createFull(BASE_JID1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(BASE_JID1); assertTrue(filter.accept(packet)); @@ -264,10 +241,7 @@ public class FromMatchesFilterTest { public void fullCompareMatchingServiceJid() { FromMatchesFilter filter = FromMatchesFilter.createFull(SERVICE_JID1); - Stanza packet = new Stanza() { - @Override - public String toXML() { return null; } - }; + Stanza packet = new Message(); packet.setFrom(SERVICE_JID1); assertTrue(filter.accept(packet));