Code example for InetSocketAddress

0
public class TestServerInfo { 
 
	@Test 
	public void testSupportsSources() 
	{ 
		ServerInfo serverInfo  = new ServerInfo("test", StateId.ONLINE.name(), new InetSocketAddress("localhost", 9000),
				"source1", "source2", "source3", "source4"); 
 
		assertEquals(4, serverInfo.getSources().size());
		assertEquals(true, serverInfo.supportsSources(Arrays.asList("source1")));
		assertEquals(true, serverInfo.supportsSources(Arrays.asList("source3")));
		assertEquals(true, serverInfo.supportsSources(Arrays.asList("source2", "source4")));
		assertEquals(false, serverInfo.supportsSources(Arrays.asList("source5")));
		assertEquals(false, serverInfo.supportsSources(Arrays.asList("source3", "source1")));
	} 
 
	@Test 
	public void testToJsonString() 
	{ 
		ServerInfo serverInfo  = new ServerInfo("test", StateId.ONLINE.name(), new InetSocketAddress("localhost", 9000),
				"source1", "source2", "source3", "source4");