@Test
public void testBuildVolumes() throws Exception {

	List<Protos.Volume> vols;
	assertEquals(MesosTaskManagerParameters.buildVolumes(Option.<String>apply(null)).size(), 0);
	String spec1 = "/host/path:/container/path:RO,/container/path:ro,/host/path:/container/path,/container/path";
	vols = MesosTaskManagerParameters.buildVolumes(Option.<String>apply(spec1));
	assertEquals(vols.size(), 4);
	assertEquals("/container/path", vols.get(0).getContainerPath());
	assertEquals("/host/path", vols.get(0).getHostPath());
	assertEquals(Protos.Volume.Mode.RO, vols.get(0).getMode());
	assertEquals("/container/path", vols.get(1).getContainerPath());
	assertEquals(Protos.Volume.Mode.RO, vols.get(1).getMode());
	assertEquals("/container/path", vols.get(2).getContainerPath());
	assertEquals("/host/path", vols.get(2).getHostPath());
	assertEquals(Protos.Volume.Mode.RW, vols.get(2).getMode());
	assertEquals("/container/path", vols.get(3).getContainerPath());
	assertEquals(Protos.Volume.Mode.RW, vols.get(3).getMode());
	// should handle empty strings, but not error
	assertEquals(0, MesosTaskManagerParameters.buildVolumes(Option.<String>apply("")).size());
}