### Question:
Tab { public abstract int getTabId(); Tab();   Tab(@NonNull final JsonObject jsonObject); @Nullable static Tab from(@NonNull final JsonObject jsonObject); @Nullable static Tab from(final int tabId); @Nullable static Type typeFrom(final int tabId); abstract int getTabId(); abstract String getTabName(Context context); @DrawableRes abstract int getTabIconRes(Context context); abstract Fragment getFragment(Context context); @Override boolean equals(final Object obj); void writeJsonOn(final JsonSink jsonSink);  }### Answer:
@Test public void checkIdDuplication() { final Set<Integer> usedIds = new HashSet<>(); for (Tab.Type type : Tab.Type.values()) { final boolean added = usedIds.add(type.getTabId()); assertTrue("Id was already used: " + type.getTabId(), added); } }
@Test public void checkIdDuplication() { final Set<Integer> usedIds = new HashSet<>(); for (final Tab.Type type : Tab.Type.values()) { final boolean added = usedIds.add(type.getTabId()); assertTrue("Id was already used: " + type.getTabId(), added); } }