// special pdu for textnegotation
final ProtocolDataUnit textNegotationUnit = new ProtocolDataUnitFactory().create(false, true, OperationCode.SCSI_TM_REQUEST, "None", "None");
textNegotationUnit.setDataSegment(ByteBuffer.wrap("hello world".getBytes()));
// setting up the connection properly
SessionSettingsNegotiator sessionSettingsNegotiator = new SessionSettingsNegotiator();
ConnectionSettingsNegotiator connectionSettingsNegotiator = new ConnectionSettingsNegotiator(sessionSettingsNegotiator);
final TargetSession session = mock(TargetSession.class);
when(connection.getSettings()).thenReturn(connectionSettingsNegotiator.getSettings());