@Test(expected = ConfigurationException.class) public void throwsExceptionWhenGivenContextClassDoesNotExtendContext() { SessionManagerConfig config = new SessionManagerConfig("Test").setContext(String.class.getName()); ContextFactory.create(config); }
public static Context create(final SessionManagerConfig config) { final Class<? extends Context> contextClass = getContextClass(config); final Context context = getNewInstance(contextClass); context.configure(config); return context; }
ContextFactory { public static Context create(final SessionManagerConfig config) { final Class<? extends Context> contextClass = getContextClass(config); final Context context = getNewInstance(contextClass); context.configure(config); return context; } }
ContextFactory { public static Context create(final SessionManagerConfig config) { final Class<? extends Context> contextClass = getContextClass(config); final Context context = getNewInstance(contextClass); context.configure(config); return context; } private  ContextFactory(); }
ContextFactory { public static Context create(final SessionManagerConfig config) { final Class<? extends Context> contextClass = getContextClass(config); final Context context = getNewInstance(contextClass); context.configure(config); return context; } private  ContextFactory(); static Context create(final SessionManagerConfig config); static Class<?> getClassForName(final String contextClassName); }
ContextFactory { public static Context create(final SessionManagerConfig config) { final Class<? extends Context> contextClass = getContextClass(config); final Context context = getNewInstance(contextClass); context.configure(config); return context; } private  ContextFactory(); static Context create(final SessionManagerConfig config); static Class<?> getClassForName(final String contextClassName);  }