PostgresFieldPath implements FieldPath { public static PostgresFieldPath fromString(final String path) throws QueryBuildException { if (!FieldPath.isValid(path)) { throw new QueryBuildException("Invalid field path: " + path); } return new PostgresFieldPath(FieldPath.splitParts(path)); } private  PostgresFieldPath(final String[] parts); private  PostgresFieldPath(final String column, final String castFunction); String toSQL(); static PostgresFieldPath fromString(final String path);  }
@Test(expected = QueryBuildException.class) public void should_ThrowsException() throws QueryBuildException { String path = "tes!t#%Incorrect_Path@#%$"; PostgresFieldPath.fromString(path); }