### Question:
ModeUtil { public static synchronized void configure(SlingSettingsService slingSettings) throws ConfigurationException { runmodes = slingSettings.getRunModes(); isAuthor = runmodes.contains(Externalizer.AUTHOR); isPublish = runmodes.contains(Externalizer.PUBLISH); if (isAuthor && isPublish) { throw new ConfigurationException(null, "Either 'author' or 'publish' run modes may be specified, not both."); } }  static WCMMode getMode(SlingHttpServletRequest req); static boolean isAuthor(); static boolean isPublish(); static boolean isRunmode(String mode); static boolean isAnalytics(SlingHttpServletRequest request); static boolean isDesign(SlingHttpServletRequest request); static boolean isDisabled(SlingHttpServletRequest request); static boolean isEdit(SlingHttpServletRequest request); static boolean isPreview(SlingHttpServletRequest request); static boolean isReadOnly(SlingHttpServletRequest request); static boolean isClassic(SlingHttpServletRequest request); static boolean isTouch(SlingHttpServletRequest request); static synchronized void configure(SlingSettingsService slingSettings);  }### Answer:
@Test(expected = ConfigurationException.class) public void testActivateBothModes() throws Exception { modes.add("author"); modes.add("publish"); ModeUtil.configure(slingSettings); verifyNoMoreInteractions(slingSettings, context); }