package com.sonymobile.tools.gerrit.gerritevents.dto;

/**
 Contains constants that represent the status of changes.
 */
public enum GerritChangeStatus {
    /**
     * Change is open.
     */
    NEW("NEW"),
    /**
     * Change was merged.
     */
    MERGED("MERGED"),
    /**
     * Change was abandoned.
     */
    ABANDONED("ABANDONED"),
    /**
     * Catch-all type if Gerrit adds a new ChangeStatus we don't know about.
     */
    UNKNOWN("UNKNOWN");

    private final String status;

    /**
     * Internal constructor for GerritChangeStatus enum.
     * @param status string value returned in JSON
     */
    GerritChangeStatus(String status) {
        this.status = status;
    }

    /**
     * Look up the GerritChangeStatus from a string representation.
     * @param status the GerritChangeStatus returned in JSON
     * @return GerritChangeStatus enum value
     */
    public static GerritChangeStatus fromString(String status) {
        for (GerritChangeStatus s : GerritChangeStatus.values()) {
            if (s.status.equals(status)) {
                return s;
            }
        }
        return UNKNOWN;
    }
}

@@ -197,17 +197,10 @@
  NEW
-(%22NEW%22)
 ,%0A
+
     
@@ -251,18 +251,8 @@
 RGED
-(%22MERGED%22)
 ,%0A  
@@ -311,21 +311,8 @@
 ONED
-(%22ABANDONED%22)
 ,%0A  
@@ -417,255 +417,9 @@
 NOWN
-(%22UNKNOWN%22);%0A%0A    private final String status;%0A%0A    /**%0A     * Internal constructor for GerritChangeStatus enum.%0A     * @param status string value returned in JSON%0A     */%0A    GerritChangeStatus(String status) %7B%0A        this.status = status;%0A    %7D
+;
 %0A%0A  
@@ -756,22 +756,22 @@
   if (s.
-status
+name()
 .equals(

Simplify code of GerritChangeStatus using enum.name() method