@BeforeClass public static void beforeEachClass() throws Exception { RemoteInfinispanTestHelper.createServer(); System.out.println("Hostaddress " + RemoteInfinispanTestHelper.hostAddress()); // read in the properties template file and set the server host:port and then save for use File f = new File("./src/test/resources/hotrod-client.properties"); Properties props = PropertiesUtils.load(f.getAbsolutePath()); props.setProperty( "infinispan.client.hotrod.server_list", RemoteInfinispanTestHelper.hostAddress() + ":" + RemoteInfinispanTestHelper.hostPort()); PropertiesUtils.print("./target/hotrod-client.properties", props); factory = new InfinispanManagedConnectionFactory(); factory.setHotRodClientPropertiesFile("./target/hotrod-client.properties"); factory.setCacheTypeMap(RemoteInfinispanTestHelper.CACHE_NAME + ":" + "java.lang.String"); }