State { public TlsContext getTlsContext() { return contextContainer.getTlsContext(); } State();  State(WorkflowTrace trace);  State(Config config);  State(Config config, WorkflowTrace workflowTrace); void reset(); final void initState(); Config getConfig(); WorkflowTrace getWorkflowTrace(); WorkflowTrace getOriginalWorkflowTrace(); void replaceTlsContext(TlsContext newTlsContext); TlsContext getTlsContext(); TlsContext getTlsContext(String alias); List<TlsContext> getAllTlsContexts(); List<TlsContext> getInboundTlsContexts(); List<TlsContext> getOutboundTlsContexts(); RunningModeType getRunningMode(); void setRunningMode(RunningModeType runningMode); WorkflowTrace getWorkflowTraceCopy(); WorkflowTrace getFilteredTraceCopy(); void storeTrace();  }
@Test public void getContextRequiresAliasForMultipleDefinedContexts() { WorkflowTrace trace = new WorkflowTrace(); trace.addConnection(new OutboundConnection("conEnd1")); trace.addConnection(new InboundConnection("conEnd2")); State s = new State(trace); exception.expect(ConfigurationException.class); exception.expectMessage("getTlsContext requires an alias if multiple contexts are defined"); TlsContext c = s.getTlsContext(); }