use of com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder in project databus by linkedin.
the class TestServerInfo method testBuilderSetAddress.
@Test
public void testBuilderSetAddress() throws Exception {
ServerInfoBuilder builder = new ServerInfoBuilder();
String address = ServerInfoBuilder.generateAddress(null, "localhost", 12345, "com.linkedin.events.source1", "com.linkedin.events.source2", "com.linkedin.events.source3");
builder.setAddress(address);
ServerInfo si = builder.build();
assertEquals(12345, si.getAddress().getPort());
assertEquals(3, si.getSources().size());
assertEquals("com.linkedin.events.source1", si.getSources().get(0));
assertEquals("com.linkedin.events.source2", si.getSources().get(1));
assertEquals("com.linkedin.events.source3", si.getSources().get(2));
}
Aggregations