public UserScenario createUserScenario ( final UserScenario scenario ) { return invoke ( USER_SCENARIOS , new RequestClosure < JsonObject > ( ) { @ Override public JsonObject call ( Invocation . Builder request ) { String json = scenario . toJSON ( ) . toString ( ) ; Entity < String > data = Entity . entity ( json , MediaType . APPLICATION_JSON_TYPE ) ; return request . post ( data , JsonObject . class ) ; } } , new ResponseClosure < JsonObject , UserScenario > ( ) { @ Override public UserScenario call ( JsonObject json ) { return new UserScenario ( json ) ; } } ) ; }
Creates a new user scenario .