@Override
    public boolean isValid() {
        if (object.has(GEOMAP) && object.has(SPRITES)) {
            throw new InvalidFieldException(GEOMAP, E_GEOMAP_SPRITE);
        }

        // Validate the region and parent
        region();
        parent();

        return hasOnlyFields(REGION, PARENT, GEOMAP, SPRITES, SCALE,
                OFFSET_X, OFFSET_Y)
                && isValidLength(GEOMAP, GEOMAP_MAX_LENGTH)
                && isValidLength(SPRITES, SPRITES_MAX_LENGTH);
    }
@Test(expected = InvalidFieldException.class)
    public void cantHaveGeoAndSprite() {
        cfg = cfgFromJson(tmpNode(GEOMAP, SPRITES));
        cfg.isValid();
    }