private EmbeddedTomcatConfiguration extractConfiguration(Class<?> testClass, AbstractConfiguration configuration) {
    """
	Try to extract {@link EmbeddedTomcat} configuration from:
	<ul>
	<li>The given {@code configuration} if it is not {@code null}.</li>
	<li>A class field/method annotated with {@link com.github.mjeanroy.junit.servers.annotations.TestServerConfiguration} on given {@code testClass} otherwise.</li>
	</ul>
	
	@param testClass The test class to analyze.
	@param configuration The configuration to use if not {@code null}.
	@return The {@link EmbeddedTomcat} configuration.
	@throws IllegalTomcatConfigurationException If extracted {@code configuration} is not an instance of {@link EmbeddedTomcatConfiguration}.
    """
		final AbstractConfiguration configurationToUse = configuration == null ? findConfiguration(testClass) : configuration;

		if (configurationToUse == null) {
			return null;
		}

		if (!(configurationToUse instanceof EmbeddedTomcatConfiguration)) {
			throw new IllegalTomcatConfigurationException();
		}

		return (EmbeddedTomcatConfiguration) configurationToUse;
	}
private EmbeddedTomcatConfiguration extractConfiguration(Class<?> testClass, AbstractConfiguration configuration) {
		final AbstractConfiguration configurationToUse = configuration == null ? findConfiguration(testClass) : configuration;

		if (configurationToUse == null) {
			return null;
		}

		if (!(configurationToUse instanceof EmbeddedTomcatConfiguration)) {
			throw new IllegalTomcatConfigurationException();
		}

		return (EmbeddedTomcatConfiguration) configurationToUse;
	}
private EmbeddedTomcatConfiguration extractConfiguration ( Class < ? > testClass , AbstractConfiguration configuration ) { final AbstractConfiguration configurationToUse = configuration == null ? findConfiguration ( testClass ) : configuration ; if ( configurationToUse == null ) { return null ; } if ( ! ( configurationToUse instanceof EmbeddedTomcatConfiguration ) ) { throw new IllegalTomcatConfigurationException ( ) ; } return ( EmbeddedTomcatConfiguration ) configurationToUse ; }
Try to extract {@link EmbeddedTomcat} configuration from:
<ul>
<li>The given {@code configuration} if it is not {@code null}.</li>
<li>A class field/method annotated with {@link com.github.mjeanroy.junit.servers.annotations.TestServerConfiguration} on given {@code testClass} otherwise.</li>
</ul>

@param testClass The test class to analyze.
@param configuration The configuration to use if not {@code null}.
@return The {@link EmbeddedTomcat} configuration.
@throws IllegalTomcatConfigurationException If extracted {@code configuration} is not an instance of {@link EmbeddedTomcatConfiguration}.
Try to extract { @link EmbeddedTomcat } configuration from : <ul > <li > The given { @code configuration } if it is not { @code null } . < / li > <li > A class field / method annotated with { @link com . github . mjeanroy . junit . servers . annotations . TestServerConfiguration } on given { @code testClass } otherwise . < / li > < / ul >