### Question:
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), inner); } private  Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataType dt); static DataValue unoptionalize(DataValue dv); static DataValue deep_unoptionalize(DataValue dv); static DataValue optionalize(DataValue v, DataType dt); static boolean is_optional_of(DataType opt, DataType inner); static boolean is_deep_optional_of(DataType opt, DataType inner);  }### Answer:
@Test public void check_non_optional_deep_optional_data_type_of_non_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_dt, m_dt)); }
@Test public void check_non_optional_deep_optional_data_type_of_optional() throws Exception { assertTrue(Optionality.is_deep_optional_of(m_odt, m_dt)); }
@Test public void check_non_optional_deep_optional_data_type_of_deep_optional() throws Exception { assertTrue(Optionality.is_deep_optional_of(m_oodt, m_dt)); }
@Test public void check_optional_deep_optional_data_type_of_non_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_dt, m_odt)); }
@Test public void check_optional_deep_optional_data_type_of_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_odt, m_odt)); }
@Test public void check_optional_deep_optional_data_type_of_deep_optional() throws Exception { assertTrue(Optionality.is_deep_optional_of(m_oodt, m_odt)); }
@Test public void check_deep_optional_deep_optional_data_type_of_non_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_dt, m_oodt)); }
@Test public void check_deep_optional_deep_optional_data_type_of_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_odt, m_oodt)); }
@Test public void check_deep_optional_deep_optional_data_type_of_deep_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_oodt, m_oodt)); }