Remove code duplication in TransactionsSpanningReplicatedCachesTest