}
@Test
public void loadServerInstances() throws Exception
{
HostInformationStore store = injector.getInstance(HostInformationStore.class);
TestCallback<List<ServerInstance>> callback = new TestCallback<List<ServerInstance>>() {
@Override
public void onSuccess(List<ServerInstance> result) {
assertTrue("No servers instances loaded", result.size()>0);
assertEquals("server-one",result.get(0).getName());
didCallback = true;
}
};
store.getServerInstances("master", callback);
synchronized (callback) {
callback.wait(500);
}