Buggy code:
public class KixmppServerTest { @ Test public void testUserMapping ( ) throws Exception { } @ Test public void testPrivateMessageUsingKixmpp ( ) throws Exception { } @ Test public void testSimpleUsingKixmpp ( ) throws Exception { } @ Test public void testSimpleUsingKixmppWithWebSocket ( ) throws Exception { } @ Test public void testSimpleUsingKixmppWithHistory ( ) throws Exception { try ( KixmppServer server = new KixmppServer ( new InetSocketAddress ( SocketUtils . findAvailableTcpPort ( ) ) , "testChat" , new InetSocketAddress ( SocketUtils . findAvailableTcpPort ( ) ) , new ConstNodeDiscovery ( ) ) ) { Assert . assertNotNull ( server . start ( ) . get ( 2 , TimeUnit . SECONDS ) ) ; ( ( com . kixeye . kixmpp . server . module . auth . InMemoryAuthenticationService ) ( server . module ( com . kixeye . kixmpp . server . module . auth . SaslKixmppServerModule . class ) . getAuthenticationService ( ) ) ) . addUser ( "testUser" , "testPassword" ) ; server . module ( MucKixmppServerModule . class ) . addService ( "conference" ) . addRoom ( "someRoom" ) ; server . module ( MucKixmppServerModule . class ) . setHistoryProvider ( new MucHistoryProvider ( ) { <START_BUG> public List < MucHistory > getHistory ( KixmppJid roomJid , Integer maxChars , Integer maxStanzas , Integer seconds , String since ) { <END_BUG> List < MucHistory > history = new ArrayList < > ( maxStanzas ) ; for ( int i = 0 ; i < maxStanzas ; i ++ ) { history . add ( new MucHistory ( KixmppJid . fromRawJid ( ( ( ( ( "user" + i ) + "@" ) + ( server . getDomain ( ) ) ) + "//computer" ) ) , roomJid , ( "nick" + i ) , ( "message" + i ) , System . currentTimeMillis ( ) ) ) ; } return history ; } } ) ; try ( KixmppClient client = new KixmppClient ( SslContext . newClientContext ( ) , Type . TCP ) ) { final LinkedBlockingQueue < Presence > presences = new LinkedBlockingQueue < > ( ) ; final LinkedBlockingQueue < MucJoin > mucJoins = new LinkedBlockingQueue < > ( ) ; final LinkedBlockingQueue < MucMessage > mucMessages = new LinkedBlockingQueue < > ( ) ; Assert . assertNotNull ( client . connect ( "localhost" , server . getBindAddress ( ) . getPort ( ) , server . getDomain ( ) ) . get ( 2 , TimeUnit . SECONDS ) ) ; client . module ( PresenceKixmppClientModule . class ) . addPresenceListener ( new PresenceListener ( ) { public void handle ( Presence presence ) { presences . offer ( presence ) ; } } ) ; client . module ( MucKixmppClientModule . class ) . addJoinListener ( new com . kixeye . kixmpp . client . module . muc . MucListener < MucJoin > ( ) { public void handle ( MucJoin event ) { mucJoins . offer ( event ) ; } } ) ; client . module ( MucKixmppClientModule . class ) . addMessageListener ( new com . kixeye . kixmpp . client . module . muc . MucListener < MucMessage > ( ) { public void handle ( MucMessage event ) { mucMessages . offer ( event ) ; } } ) ; Assert . assertNotNull ( client . login ( "testUser" , "testPassword" , "testResource" ) . get ( 2 , TimeUnit . SECONDS ) ) ; client . module ( PresenceKixmppClientModule . class ) . updatePresence ( new Presence ( ) ) ; Assert . assertNotNull ( presences . poll ( 2 , TimeUnit . SECONDS ) ) ; client . module ( MucKixmppClientModule . class ) . joinRoom ( KixmppJid . fromRawJid ( "someRoom@conference.testChat" ) , "testNick" , 5 , null , null , null ) ; MucJoin mucJoin = mucJoins . poll ( 2 , TimeUnit . SECONDS ) ; Assert . assertNotNull ( mucJoin ) ; int count = 0 ; while ( ( mucMessages . poll ( 2 , TimeUnit . SECONDS ) ) != null ) { count ++ ; } Assert . assertEquals ( 5 , count ) ; } } } @ Test public void testSimpleUsingSmack ( ) throws Exception { } }

Fix:
public List < MucHistory > getHistory ( KixmppJid roomJid , KixmppJid userJid , Integer maxChars , Integer maxStanzas , Integer seconds , String since ) {