@Test
public void testFromJson() {

    final CheckSpec.JsonKeys keys = CheckSpec.keys();
    final JsonObject specJson = obj()
            .key(keys.name(), keys.name())
            .key(keys.impl(), keys.impl())
            .key(keys.inlineScript(), keys.inlineScript())
            .key(keys.inlineEngine(), keys.inlineEngine())
            .key(keys.config(), key("foo", "bar"))
            .key(keys.template(), keys.template())
            .key(keys.skip(), true)
            .get();
    final CheckSpec spec = CheckSpec.fromJson(specJson);
    assertEquals("fromJson getName same", keys.name(), spec.getName());
    assertEquals("fromJson getImpl same", keys.impl(), spec.getImpl());
    assertEquals("fromJson getTemplate same", keys.template(), spec.getTemplate());
    assertEquals("fromJson getInlineScript same", keys.inlineScript(), spec.getInlineScript());
    assertEquals("fromJson getInlineEngine same", keys.inlineEngine(), spec.getInlineEngine());
    assertEquals("fromJson getConfig same", key("foo", "bar").get(), spec.getConfig());
    assertTrue("fromJson isSkip true", spec.isSkip());
    assertEquals("json should be equal", specJson, spec.toJson());
    assertEquals("toString should equal toJson().toString",
            specJson.toString(), spec.toString());
}