install(new FactoryModuleBuilder().implement(SerializerDeserializer.class, KryoSerDeser.class).build(
SerializerDeserializerFactory.class));
bind(RemoteEmitters.class).toInstance(Mockito.mock(RemoteEmitters.class));
bind(Clusters.class).toInstance(Mockito.mock(Clusters.class));
Cluster mockedCluster = Mockito.mock(Cluster.class);
Mockito.when(mockedCluster.getPhysicalCluster()).thenReturn(new PhysicalCluster(1));
bind(Cluster.class).toInstance(mockedCluster);
Assignment mockedAssignment = Mockito.mock(Assignment.class);
Mockito.when(mockedAssignment.assignClusterNode()).thenReturn(new ClusterNode(0, 0, "machine", "Task-0"));
bind(Assignment.class).toInstance(mockedAssignment);
Names.bindProperties(binder(), ImmutableMap.of("s4.cluster.name", "testCluster", "s4.comm.timeout", "10000"));