// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 package com.amazonaws.services.sample.apigateway.websocketratelimit; import org.junit.Assert; import org.junit.Test; import software.amazon.awscdk.App; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import java.io.IOException; public class RateLimitTest { private final static ObjectMapper JSON = new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, true); @Test public void testStack() throws IOException { App app = new App(); RateLimitStack stack = new RateLimitStack(app, "test"); // synthesize the stack to a CloudFormation template JsonNode actual = JSON.valueToTree(app.synth().getStackArtifact(stack.getArtifactId()).getTemplate()); Assert.assertNotNull(actual); } }