@Before
	public void before() {
		PageRequest pageable = new PageRequest(0, 20);
		ContainerAttributes attributes1 = new ContainerAttributes("1").setPid(1234).setHost("host1").setIp("127.0.0.1");
		ContainerAttributes attributes2 = new ContainerAttributes("2").setPid(2345).setHost("host2").setIp(
				"192.168.2.1");
		List<DetailedContainer> containers = new ArrayList<DetailedContainer>();
		Container container1 = new Container(attributes1.getId(), attributes1);
		Container container2 = new Container(attributes2.getId(), attributes2);
		containers.add(new DetailedContainer(container1));
		containers.add(new DetailedContainer(container2));
		Page<DetailedContainer> pagedEntity = new PageImpl<DetailedContainer>(containers);
		when(containerRepository.findAllRuntimeContainers(pageable, true)).thenReturn(pagedEntity);
		when(containerRepository.findOne("1")).thenReturn(container1);
	}
Tests REST compliance of containers endpoint.

@author Ilayaperumal Gopinathan
@author Mark Fisher
@author David Turanski
@author Gunnar Hillert
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/ContainersControllerIntegrationTests.java