src/test/java/com/digitalglobe/util/maven/plugin/TestCloudFormationDeploy.java
/**
         * Use this method to mock assuming a role.
         *
         * @param assumeRoleRequest contains information about the role to mock.
         * @return a result that contains the new set of credentials to use in the mock.
         */
Use this method to mock assuming a role.
@param assumeRoleRequest contains information about the role to mock.
@return a result that contains the new set of credentials to use in the mock.
Use this method to mock assuming a role . @param assumeRoleRequest contains information about the role to mock . @return a result that contains the new set of credentials to use in the mock .
@Override
        public AssumeRoleResponse assumeRole(AssumeRoleRequest assumeRoleRequest) {
            Assert.assertEquals(assumeRoleRequest.roleArn(), "aws:iam::1111:role/test");
            return AssumeRoleResponse.builder()
                    .credentials(Credentials.builder()
                            .accessKeyId("A")
                            .secretAccessKey("B")
                            .sessionToken("C")
                            .expiration(Instant.now().plus(1, ChronoUnit.HOURS))
                            .build())
                    .build();
        }
@ Override public AssumeRoleResponse assumeRole ( AssumeRoleRequest assumeRoleRequest ) { Assert . assertEquals ( assumeRoleRequest . roleArn ( ) , "aws:iam::1111:role/test" ) ; return AssumeRoleResponse . builder ( ) . credentials ( Credentials . builder ( ) . accessKeyId ( "A" ) . secretAccessKey ( "B" ) . sessionToken ( "C" ) . expiration ( Instant . now ( ) . plus ( 1 , ChronoUnit . HOURS ) ) . build ( ) ) . build ( ) ; }
Use this method to mock assuming a role.
Use this method to mock assuming a role .