assertEquals(code1, code2);
}
private static void leaveOneSubtype(JsonObject typeConfig, String subtypeName)
throws JsonParseException {
JsonObject weightConfig = typeConfig.get("weights").getAsJsonObject();
for (Entry<String, JsonElement> entry : weightConfig.entrySet()) {
String name = entry.getKey();
if (name.equals(subtypeName)) {
weightConfig.addProperty(name, 1);
} else {
weightConfig.addProperty(name, 0);
}
}
}