public class RemoteConfigurationFetcherTest extends TestCase {
public void testSimple() throws Exception {
String remoteMachineURL = "http://www.example.com/jsunit";
MockRemoteServerHitter hitter = new MockRemoteServerHitter();
ServerConfiguration configuration = new ServerConfiguration(new DummyConfigurationSource());
Document configurationDocument = new Document(configuration.asXml());
hitter.urlToDocument.put(remoteMachineURL + "/config", configurationDocument);
RemoteConfigurationFetcher fetcher = new RemoteConfigurationFetcher(hitter, new URL(remoteMachineURL));
fetcher.start();
fetcher.join();