public static HotRodServer startHotRodServer(EmbeddedCacheManager cacheManager) {
// TODO: This is very rudimentary!! HotRodTestingUtil needs a more robust solution where ports are generated randomly and retries if already bound
HotRodServer server = null;
int maxTries = 10;
int currentTries = 0;
ChannelException lastException = null;
while (server == null && currentTries < maxTries) {
try {
server = HotRodTestingUtil.startHotRodServer(cacheManager, uniquePort.incrementAndGet());
} catch (ChannelException e) {
if (!(e.getCause() instanceof BindException)) {