@Test
public void testPath() {

  Path a = new Path("", true);
  Assert.assertEquals("", a.getDevice());
  Assert.assertEquals("", a.getMeasurement());
  Path b = new Path("root.\"sg\".\"d1\".\"s1\"", true);
  Assert.assertEquals("root.\"sg\".\"d1\"", b.getDevice());
  Assert.assertEquals("\"s1\"", b.getMeasurement());
  Path c = new Path("root.\"sg\".\"d1\".s1", true);
  Assert.assertEquals("root.\"sg\".\"d1\"", c.getDevice());
  Assert.assertEquals("s1", c.getMeasurement());
  Path d = new Path("s1", true);
  Assert.assertEquals("s1", d.getMeasurement());
  Assert.assertEquals("", d.getDevice());
  Path e = new Path("root.\"s.g\".d1.\"s..\\\"s1\"", true);
  Assert.assertEquals("root.\"s.g\".d1", e.getDevice());
  Assert.assertEquals("\"s..\\\"s1\"", e.getMeasurement());
}