@@ -0,0 +1,876 @@
+package com.vrachieru.cnp4j;%0A%0Aimport com.vrachieru.cnp4j.exception.InvalidCitizenshipException;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic enum Citizenship %7B%0A    ROMANIAN,%0A    RESIDENT,%0A    FOREIGN;%0A%0A    private static Map%3CInteger, Citizenship%3E MAPPING = new HashMap%3CInteger, Citizenship%3E();%0A%0A    static %7B%0A        for (int i : Arrays.asList(1, 2, 3, 4, 5, 6)) %7B%0A            MAPPING.put(i, ROMANIAN);%0A        %7D%0A        for (int i : Arrays.asList(7, 8)) %7B%0A            MAPPING.put(i, RESIDENT);%0A        %7D%0A        MAPPING.put(9, FOREIGN);%0A    %7D%0A%0A    public static Map%3CInteger, Citizenship%3E getMapping() %7B%0A        return MAPPING;%0A    %7D%0A%0A    public static Citizenship getByCode(final int code) %7B%0A        if (!MAPPING.containsKey(code)) %7B%0A            throw new InvalidCitizenshipException();%0A        %7D%0A        return MAPPING.get(code);%0A    %7D%0A%7D%0A

Add citizenship entity