/** Check that an event without instructions throws an exception. */
  @Test(expected = MissingDowngradeInstructions.class)
  public void testCheckConsistencyOfProperties_eventMissingInstructions() {
    when(mockNodeService.hasAspect(NODE_REF, ASPECT_CLASSIFIED)).thenReturn(true);
    when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_DATE)).thenReturn(null);
    when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_EVENT)).thenReturn("Event");
    when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_INSTRUCTIONS)).thenReturn(null);

    classifiedAspect.checkConsistencyOfProperties(NODE_REF);
  }
  /** Check that omitting all downgrade fields is valid. */
  @Test
  public void testCheckConsistencyOfProperties_notSpecified() {
    when(mockNodeService.hasAspect(NODE_REF, ASPECT_CLASSIFIED)).thenReturn(true);
    when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_DATE)).thenReturn(null);
    when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_EVENT)).thenReturn(null);
    when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_INSTRUCTIONS)).thenReturn(null);

    classifiedAspect.checkConsistencyOfProperties(NODE_REF);
  }