@ -31,6 +31,7 @@ import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException ;
import org.jivesoftware.smack.packet.IQ ;
import org.jivesoftware.smack.packet.StanzaError ;
import org.jivesoftware.smack.test.util.Whitebox ;
import org.jivesoftware.smack.util.stringencoder.Base64 ;
import org.jivesoftware.smackx.InitExtensions ;
@ -45,7 +46,6 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test ;
import org.jxmpp.jid.EntityFullJid ;
import org.jxmpp.jid.JidTestUtil ;
import org.powermock.reflect.Whitebox ;
/ * *
* Test for InBandBytestreamSession .
@ -309,7 +309,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
// insert data to read
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
String base64Data = Base64 . encode ( "Data" ) ;
DataPacketExtension dpe = new DataPacketExtension ( sessionID , 0 , base64Data ) ;
Data data = new Data ( dpe ) ;
@ -343,7 +343,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
String base64Data = Base64 . encode ( "Data" ) ;
DataPacketExtension dpe = new DataPacketExtension ( sessionID , 0 , base64Data ) ;
@ -381,7 +381,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// build data packets
String base64Data = Base64 . encode ( "Data" ) ;
@ -420,7 +420,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// build data packets
DataPacketExtension dpe = new DataPacketExtension ( sessionID , 0 , "AA=BB" ) ;
@ -454,7 +454,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// build invalid packet with out of order sequence
String base64Data = Base64 . encode ( "Data" ) ;
@ -495,7 +495,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// set data packet acknowledgment and notify listener
for ( int i = 0 ; i < controlData . length / blockSize ; i + + ) {
@ -542,7 +542,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// set data packet acknowledgment and notify listener
for ( int i = 0 ; i < controlData . length / blockSize ; i + + ) {
@ -583,7 +583,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// build data packet
String base64Data = Base64 . encode ( "Data" ) ;
@ -626,7 +626,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
InBandBytestreamSession session = new InBandBytestreamSession ( connection , initBytestream ,
initiatorJID ) ;
final InputStream inputStream = session . getInputStream ( ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , StanzaListener . class ) ;
StanzaListener listener = Whitebox . getInternalState ( inputStream , "dataPacketListener" , StanzaListener . class ) ;
// build data packet
String base64Data = Base64 . encode ( "Data" ) ;