### Question:
PostgresqlUtils { public static String toDataKey(String key) { if (!key.matches("^[a-zA-Z0-9_.]+$")) { throw new IllegalArgumentException("Illegal key: " + key); } List<String> keys = Arrays.asList(key.split("\\.")); StringBuilder sb = new StringBuilder("data"); for (int i = 0; i < keys.size(); i++) { if (i == keys.size() - 1) { sb.append(" ->> "); } else { sb.append(" -> "); } sb.append("'").append(keys.get(i)).append("'"); } return sb.toString(); } private  PostgresqlUtils(); static String toDataKey(String key); static String toQueryValue(Object queryValue); static boolean isErrorDuplicateKey(SQLException e);  }### Answer:
@Test void testToDataKey() throws Exception { assertThat(PostgresqlUtils.toDataKey("foo")).isEqualTo("data ->> 'foo'"); assertThat(PostgresqlUtils.toDataKey("foo.bar")).isEqualTo("data -> 'foo' ->> 'bar'"); assertThat(PostgresqlUtils.toDataKey("foo.bar.bla")).isEqualTo("data -> 'foo' -> 'bar' ->> 'bla'"); }