Using https://javadoc.io/doc/io.temporal/temporal-testing/latest/io/temporal/testing/TestActivityEnvironment.html This has less overhead compared to worfklow test environment as no extra worker threads need to be allocated.