### Question:
TagW implements Serializable { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + id; result = prime * result + ((keyword == null) ? 0 : keyword.hashCode()); return result; } TagW(int id, String keyword, String displayedName, TagType type, int vmMin, int vmMax, Object defaultValue);  TagW(int id, String keyword, TagType type, int vmMin, int vmMax);  TagW(int id, String keyword, String displayedName, TagType type);  TagW(int id, String keyword, TagType type);  TagW(String name, TagType type, int vmMin, int vmMax);  TagW(String keyword, String displayedName, TagType type);  TagW(String keyword, TagType type); int getId(); String getKeyword(); String getDisplayedName(); TagType getType(); int getValueMultiplicity(); boolean isTypeCompliant(Object value); static int getValueMultiplicity(Object value); static Object getValueFromIndex(Object value, int index); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); void readValue(Object data, Tagable tagable); Object getValue(Object data); boolean isStringFamilyType(); synchronized int getAnonymizationType(); synchronized void setAnonymizationType(int anonymizationType); String getFormattedTagValue(Object value, String format); static void addTag(TagW tag); static TagW get(String keyword); static T getTagValue(TagReadable tagable, TagW tag, Class<T> type); static final String NO_VALUE; static final TagW UnknownTag; static final TagW Group; static final TagW PatientPseudoUID; static final TagW SeriesLoading; static final TagW Thumbnail; static final TagW ThumbnailPath; static final TagW ExplorerModel; static final TagW PresentationModel; static final TagW PresentationModelBirary; static final TagW SplitSeriesNumber; static final TagW SeriesSelected; static final TagW SeriesOpen; static final TagW SeriesFocused; static final TagW ImageWidth; static final TagW ImageHeight; static final TagW ImageDepth; static final TagW ImageOrientationPlane; static final TagW ImageBitsPerPixel; static final TagW ImageCache; static final TagW ShutterFinalShape; static final TagW ShutterRGBColor; static final TagW ShutterPSValue; static final TagW OverlayBitMask; static final TagW OverlayBurninDataPath; static final TagW HasOverlay; static final TagW ObjectToSave; static final TagW WadoCompressionRate; static final TagW WadoTransferSyntaxUID; static final TagW DirectDownloadFile; static final TagW DirectDownloadThumbnail; static final TagW ReadFromDicomdir; static final TagW WadoParameters; static final TagW WadoInstanceReferenceList; static final TagW DicomSpecialElementList; static final TagW SlicePosition; static final TagW SuvFactor; static final TagW RootElement; static final TagW FilePath; static final TagW FileName; static final TagW CurrentFolder; static final TagW Checked; static final TagW SubseriesInstanceUID; static final TagW VOILUTsExplanation; static final TagW VOILUTsData; static final TagW ModalityLUTExplanation; static final TagW ModalityLUTType; static final TagW ModalityLUTData; static final TagW PRLUTsExplanation; static final TagW PRLUTsData; static final TagW MonoChrome; }### Answer:
@Test public void test_hashCode() throws Exception { assertThat(new TagW(ID_1, KEYWORD_1, TagType.STRING).hashCode()).isEqualTo(-707519243); assertThat(new TagW(ID_1, null, TagType.STRING).hashCode()).isEqualTo(4774); }