Source:How to execute cucumber feature file parallel
public enum Type {
PIZZA, APPLE, PEAR, SOUP;
@JsonCreator
public static Type fromString(String key) {
for(Type type : Type.values()) {
if(type.name().equalsIgnoreCase(key)) {
return type;
}
}
return null;
}
}