junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/jupiter/JunitServerExtension.java
private EmbeddedServerRunner registerEmbeddedServer(ExtensionContext context, boolean staticMode) {
		Class<?> testClass = context.getRequiredTestClass();
		EmbeddedServer<?> server = this.server == null ? instantiateServer(testClass, configuration) : this.server;

		EmbeddedServerRunner serverAdapter = new EmbeddedServerRunner(server);
		serverAdapter.beforeAll();

		putEmbeddedServerAdapterInStore(context, serverAdapter, staticMode);

		return serverAdapter;
	}
private EmbeddedServerRunner registerEmbeddedServer(ExtensionContext context, boolean staticMode) {
		Class<?> testClass = context.getRequiredTestClass();
		EmbeddedServer<?> server = this.server == null ? instantiateServer(testClass, configuration) : this.server;

		EmbeddedServerRunner serverAdapter = new EmbeddedServerRunner(server);
		serverAdapter.beforeAll();

		putEmbeddedServerAdapterInStore(context, serverAdapter, staticMode);

		return serverAdapter;
	}
Start and register the embedded server.

The embedded server may be used in two modes:

<ul>
<li>Started before all tests, and stopped after all tests, this is the static mode (the extension has been used as a static extension).</li>
<li>Started before each tests, and stopped after eacg tests, this is the non static mode (the extension has not been used as a static extension).</li>
</ul>

@param context The test context.
@param staticMode {@code true} if the extension has been registered as a static extension, {@code false} otherwise.
@return The registered adapter.