While a lambda is still processing (archive unpacking etc), the lambda state should be set to "Pending" (currently "Active") and invocations to that lambda should fail (currently, it can end up in a inconsistent state in this case, like lambdas being executed without layers).

Lambda state should reflect the current internal state, and invocations should fail if not active.
tmpdir = tmpdir_factory.mktemp("tmp-java-zip")
        zip_lib_dir = os.path.join(tmpdir, "lib")
        zip_jar_path = os.path.join(zip_lib_dir, "test.lambda.jar")
        mkdir(zip_lib_dir)
        cp_r(
            INSTALL_PATH_LOCALSTACK_FAT_JAR,
            os.path.join(zip_lib_dir, "executor.lambda.jar"),
        )
        save_file(zip_jar_path, test_java_jar)
        return testutil.create_zip_file(tmpdir, get_content=True)
    @pytest.fixture(
        params=JAVA_TEST_RUNTIMES,
    )
    def simple_java_lambda(self, create_lambda_function, test_java_zip, request):
        function_name = f"java-test-function-{short_uid()}"
        create_lambda_function(
            func_name=function_name,
            zip_file=test_java_zip,
            runtime=request.param,
            handler="cloud.localstack.sample.LambdaHandler",
        )
        return function_name
    @pytest.mark.skip_snapshot_verify(
        paths=["$..invoke-result.LogResult", "$..invoke-result.Payload"]
    )
    def test_java_runtime(self, lambda_client, simple_java_lambda, snapshot):
        """Tests a simple java lambda invocation"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        result = lambda_client.invoke(
            FunctionName=simple_java_lambda,