### Question:
TomcatManagedContainer implements DeployableContainer<TomcatManagedConfiguration> { String getJavaCommand() { if (configuration == null) { throw new IllegalStateException("setup not called"); } return configuration.getJavaHome() + File.separator + "bin" + File.separator + "java"; } TomcatManagedContainer(final ProtocolDescription protocolDescription,
        final TomcatManagerCommandSpec tomcatManagerCommandSpec); @Override Class<TomcatManagedConfiguration> getConfigurationClass(); @Override ProtocolDescription getDefaultProtocol(); @Override void setup(final TomcatManagedConfiguration configuration); @Override void start(); @Override void stop(); @Override ProtocolMetaData deploy(final Archive<?> archive); @Override void undeploy(final Archive<?> archive); @Override void deploy(final Descriptor descriptor); @Override void undeploy(final Descriptor descriptor);  }### Answer:
@Test(expected = IllegalStateException.class) public void testGetJavaCommandForNoConfiguration() { commonTomcatManagedContainer.getJavaCommand(); }