use of org.opencastproject.serviceregistry.api.JaxbHostRegistration in project opencast by opencast.
the class ServersListProviderTest method setUp.
@Before
public void setUp() throws Exception {
this.serviceRegistry = EasyMock.createNiceMock(ServiceRegistry.class);
serverListProvider = new ServersListProvider();
List<HostRegistration> hosts = new ArrayList<HostRegistration>();
hosts.add(new JaxbHostRegistration(HOST1, "1.1.1.1", 400000, 8, 8, true, false));
hosts.add(new JaxbHostRegistration(HOST2, "1.1.1.2", 400000, 8, 8, true, true));
hosts.add(new JaxbHostRegistration(HOST3, "1.1.1.3", 500000, 2, 8, false, false));
hosts.add(new JaxbHostRegistration(HOST4, "1.1.1.4", 500000, 6, 8, true, true));
EasyMock.expect(serviceRegistry.getHostRegistrations()).andReturn(hosts).anyTimes();
serverListProvider.setServiceRegistry(serviceRegistry);
serverListProvider.activate(null);
EasyMock.replay(serviceRegistry);
}
Aggregations