### Question:
IVRNotificationMapping { public void setType(String type) { this.type = null; if ( type.equalsIgnoreCase(INFORMATIONAL) || type.equalsIgnoreCase(REMINDER) ) this.type = type; }  long getId(); void setId(long id); String getType(); void setType(String type); String getIvrEntityName(); void setIvrEntityName(String ivrEntityName); @Override int hashCode(); @Override boolean equals(Object obj); static String INFORMATIONAL; static String REMINDER; }### Answer:
@Test public void testSetType() { IVRNotificationMapping mapping = new IVRNotificationMapping(); mapping.setType(IVRNotificationMapping.INFORMATIONAL); assertEquals(IVRNotificationMapping.INFORMATIONAL, mapping.getType()); mapping.setType(IVRNotificationMapping.REMINDER); assertEquals(IVRNotificationMapping.REMINDER, mapping.getType()); mapping.setType("blah"); assertNull(mapping.getType()); }