public static Map<String, Object> getResolvedPropertiesByPath(String pathSpec, DataSchema dataSchema)
  {
    if (dataSchema == null)
    {
      throw new IllegalArgumentException("Invalid data schema input");
    }

    if (pathSpec == null || (!pathSpec.isEmpty() && !PathSpec.validatePathSpecString(pathSpec)))
    {
      throw new IllegalArgumentException(String.format("Invalid inputs: PathSpec %s", pathSpec));
    }
    DataSchema dataSchemaToPath = findDataSchemaByPath(dataSchema, pathSpec);
    return dataSchemaToPath.getResolvedProperties();
  }
@Test
  public void testGetResolvedPropertiesByPath() throws Exception
  {
    RecordDataSchema testSchema = (RecordDataSchema) TestUtil.dataSchemaFromPdlString(simpleTestSchema);
    try
    {
      SchemaAnnotationProcessor.getResolvedPropertiesByPath("/f0/f3", testSchema);
    }
    catch (IllegalArgumentException e)
    {
      assert (e.getMessage().equals("Could not find path segment \"f3\" in PathSpec \"/f0/f3\""));
    }

    try
    {
      SchemaAnnotationProcessor.getResolvedPropertiesByPath("/f1/string", testSchema);
    }
    catch (IllegalArgumentException e)
    {
      assert (e.getMessage().equals("Could not find path segment \"string\" in PathSpec \"/f1/string\""));
    }
  }