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 TestableServer createTestableServer ( Configuration config ) { } 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 ) ) ; backupConfig . setJournalDirectory ( ( ( backupConfig . getJournalDirectory ( ) ) + suffix ) ) ; backupConfig . setPagingDirectory ( ( ( backupConfig . getPagingDirectory ( ) ) + suffix ) ) ; backupConfig . setLargeMessagesDirectory ( ( ( backupConfig . getLargeMessagesDirectory ( ) ) + suffix ) ) ; backupConfig . setSecurityEnabled ( false ) ; backupConfig . setMaxSavedReplicatedJournalSize ( 0 ) ; nodeManager = new org . hornetq . core . server . impl . InVMNodeManager ( true , backupConfig . getJournalDirectory ( ) ) ; backupServer = createTestableServer ( backupConfig ) ; liveConfig . getAcceptorConfigurations ( ) . clear ( ) ; liveConfig . getAcceptorConfigurations ( ) . add ( getAcceptorTransportConfiguration ( true ) ) ; liveServer = createTestableServer ( liveConfig ) ; } protected final void adaptLiveConfigForReplicatedFailBack ( Configuration configuration ) { } @ Override @ After public void tearDown ( ) throws Exception { } protected final 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 ) { } public void nodeUP ( TopologyMember topologyMember , boolean last ) { } public void nodeDown ( final long uniqueEventID , String nodeID ) { } } }

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