Buggy code:
public abstract class FailoverTestBase extends ServiceTestBase { protected static final SimpleString ADDRESS = new SimpleString ( "FailoverTestAddress" ) ; protected static final int MIN_LARGE_MESSAGE = 1024 ; private static final int LARGE_MESSAGE_SIZE = ( FailoverTestBase . MIN_LARGE_MESSAGE ) * 3 ; protected static final int PAGE_MAX = 2 * 1024 ; protected static final int PAGE_SIZE = 1024 ; protected TestableServer liveServer ; protected TestableServer backupServer ; protected Configuration backupConfig ; protected Configuration liveConfig ; protected NodeManager nodeManager ; protected boolean startBackupServer = true ; @ Override @ Before public void setUp ( ) throws Exception { } protected void waitForBackup ( ) { } protected void setBackupIdentity ( ) { } protected void setLiveIdentity ( ) { } protected TestableServer createTestableServer ( Configuration config ) { } protected TestableServer createColocatedTestableServer ( Configuration config , NodeManager liveNodeManager , NodeManager backupNodeManager , int id ) { } protected static void setLargeMessageBody ( final int i , final ClientMessage message ) { } protected static void assertLargeMessageBody ( final int i , final ClientMessage message ) { } protected void createConfigs ( ) throws Exception { } protected void createReplicatedConfigs ( ) throws Exception { final TransportConfiguration liveConnector = getConnectorTransportConfiguration ( true ) ; final TransportConfiguration backupConnector = getConnectorTransportConfiguration ( false ) ; final TransportConfiguration backupAcceptor = getAcceptorTransportConfiguration ( false ) ; backupConfig = createDefaultConfig ( ) ; liveConfig = createDefaultConfig ( ) ; <START_BUG> ReplicatedBackupUtils . configureReplicationPair ( backupConfig , backupConnector , backupAcceptor , liveConfig , liveConnector ) ; <END_BUG> final String suffix = "_backup" ; backupConfig . setBindingsDirectory ( ( ( backupConfig . getBindingsDirectory ( ) ) + suffix ) ) . setJournalDirectory ( ( ( backupConfig . getJournalDirectory ( ) ) + suffix ) ) . setPagingDirectory ( ( ( backupConfig . getPagingDirectory ( ) ) + suffix ) ) . setLargeMessagesDirectory ( ( ( backupConfig . getLargeMessagesDirectory ( ) ) + suffix ) ) . setSecurityEnabled ( false ) ; setupHAPolicyConfiguration ( ) ; nodeManager = new org . hornetq . core . server . impl . InVMNodeManager ( true , backupConfig . getJournalDirectory ( ) ) ; backupServer = createTestableServer ( backupConfig ) ; liveConfig . clearAcceptorConfigurations ( ) . addAcceptorConfiguration ( getAcceptorTransportConfiguration ( true ) ) ; liveServer = createTestableServer ( liveConfig ) ; } protected void setupHAPolicyConfiguration ( ) { } protected final void adaptLiveConfigForReplicatedFailBack ( TestableServer server ) { } @ Override @ After public void tearDown ( ) throws Exception { } protected ClientSessionFactoryInternal createSessionFactoryAndWaitForTopology ( ServerLocator locator , int topologyMembers ) throws Exception { } protected void waitForBackup ( ClientSessionFactoryInternal sessionFactory , int seconds ) throws Exception { } protected abstract TransportConfiguration getAcceptorTransportConfiguration ( boolean live ) { } protected abstract TransportConfiguration getConnectorTransportConfiguration ( final boolean live ) { } protected ServerLocatorInternal getServerLocator ( ) throws Exception { } protected void crash ( final ClientSession ... sessions ) throws Exception { } protected void crash ( final boolean waitFailure , final ClientSession ... sessions ) throws Exception { } public static final class LatchClusterTopologyListener implements ClusterTopologyListener { final CountDownLatch latch ; List < String > liveNode = new ArrayList < String > ( ) ; List < String > backupNode = new ArrayList < String > ( ) ; public LatchClusterTopologyListener ( CountDownLatch latch ) { } @ Override public void nodeUP ( TopologyMember topologyMember , boolean last ) { } @ Override public void nodeDown ( final long uniqueEventID , String nodeID ) { } } }

Fix:
ReplicatedBackupUtils . configureReplicationPair ( backupConfig , backupConnector , backupAcceptor , liveConfig , liveConnector , null ) ;