public static Connection fromProperties(Properties properties) {
    return fromProperties(properties, getDefault(properties));
  }
@Test
  public void testPropertiesConnection() {
    // Create properties
    Properties properties = new Properties();
    properties.setProperty("brokerList", "127.0.0.1:1234,localhost:2345");

    // Create the connection
    Connection connection = ConnectionFactory.fromProperties(properties);

    // Check that the broker list has the right length and has the same servers
    Assert.assertEquals(connection.getBrokerList(), ImmutableList.of("127.0.0.1:1234", "localhost:2345"));
  }