@Test
public void shouldOnlyStartOneServerThread() {
int threadCount = Thread.activeCount();
SmackConfiguration.setLocalSocks5ProxyPort(7890);
Socks5Proxy proxy = Socks5Proxy.getSocks5Proxy();
proxy.start();
assertTrue(proxy.isRunning());
assertEquals(threadCount + 1, Thread.activeCount());
proxy.start();
assertTrue(proxy.isRunning());
assertEquals(threadCount + 1, Thread.activeCount());
proxy.stop();
assertFalse(proxy.isRunning());
assertEquals(threadCount, Thread.activeCount());
proxy.start();
assertTrue(proxy.isRunning());
assertEquals(threadCount + 1, Thread.activeCount());
proxy.stop();
}