### Question:
Entry { void validate() { if (value == null) throw new IllegalStateException("Entry must contain a non-null value."); if (contextType == null) throw new IllegalStateException("Entry must have a ContextType."); if (propagationModes == null) throw new IllegalStateException("Entry must have a EnumSet<PropagationMode."); if (isOriginator == null) throw new IllegalStateException("Entry must know if it originated in this scope."); if (allowAllToRead == null) throw new IllegalStateException("Entry's allowAllToRead was not specified."); } Entry(Object context, EnumSet<PropagationMode> propModes, ContextType contextType); View getView(); static Entry createViewEntryInstance(Object context, 
      EnumSet<PropagationMode> propModes, final ViewImpl view); String getClassName(); static Entry createOpaqueEntryInstance(Object context, 
      EnumSet<PropagationMode> propModes, final String className); Entry init(Boolean isOriginator, Boolean allowAllToRead); @Override String toString(); ContextType getContextType(); @SuppressWarnings("unchecked") U getValue(); EnumSet<PropagationMode> getPropagationModes();  }### Answer:
@Test public void validatel() { createContext("value", PropagationMode.defaultSet(), ContextType.ASCII_STRING, IS_ORIGIN, ALLOW_ALL_TO_READ).validate(); }
@Test(expected=IllegalStateException.class) public void validateNullValue() { createContext(null, PropagationMode.defaultSet(), ContextType.ASCII_STRING, IS_ORIGIN, ALLOW_ALL_TO_READ).validate(); }
@Test(expected=IllegalStateException.class) public void validateNullPropMode() { createContext("value", null, ContextType.ASCII_STRING, IS_ORIGIN, ALLOW_ALL_TO_READ).validate(); }
@Test(expected=IllegalStateException.class) public void validateNullContextType() { createContext("value", PropagationMode.defaultSet(), null, IS_ORIGIN, ALLOW_ALL_TO_READ).validate(); }
@Test(expected=IllegalStateException.class) public void validateNullISOriginator() { createContext("value", PropagationMode.defaultSet(), ContextType.ASCII_STRING, (Boolean) null, ALLOW_ALL_TO_READ).validate(); }
@Test(expected=IllegalStateException.class) public void validateNullAllowAllToRead() { createContext("value", PropagationMode.defaultSet(), ContextType.ASCII_STRING, IS_ORIGIN, null).validate(); }