@Test
public void testSplitKeyPieces() throws FileNotFoundException, IOException {

    /*
     * Initial data generated with: Gson g = new GsonBuilder().create();
     * TreeMap<String, List<KeyPiece>> tm = new TreeMap<String,
     * List<KeyPiece>>();
     * 
     * for (final ResourceString s : EXPECTED_INPUT_RES_LIST) {
     * tm.put(s.getKey(), JsonResource.splitKeyPieces(s.getKey())); }
     * System.out.println(g.toJson(tm));
     */
    JsonObject SPLITKEY_DATA = ResourceTestUtil.parseJson(SPLITKEYS).getAsJsonObject();
    for (final Entry<String, JsonElement> e : SPLITKEY_DATA.entrySet()) {
        final String key = e.getKey();
        final JsonArray expectList = e.getValue().getAsJsonArray();
        List<KeyPiece> actualList = JsonResource.splitKeyPieces(key);
        String prefix = "‘" + key + "’: ";
        assertEquals(prefix + "key count", expectList.size(), actualList.size());
        for (int n = 0; n < expectList.size(); n++) {
            JsonObject expectObject = expectList.get(n).getAsJsonObject();
            KeyPiece actualObject = actualList.get(n);
            String subPrefix = prefix + " key " + n;
            assertEquals(subPrefix + " value ", expectObject.get("keyValue").getAsString(), actualObject.keyValue);
            assertEquals(subPrefix + " type ", expectObject.get("keyType").getAsString(),
                    actualObject.keyType.name());
        }
    }
}