@Before
    public void setUp() throws Exception {
        mockServer = new EC2MetadataServiceMock(tokenEnabled);
        mockServer.start();
    }
Starts up the mock EC2 Instance Metadata Service.
aws-java-sdk-core/src/test/java/com/amazonaws/auth/InstanceProfileCredentialsProviderIntegrationTest.java