UserService extends RestService { public Mono<ChannelData> createDM(DMCreateRequest request) { return Routes.USER_DM_CREATE.newRequest() .body(request) .exchange(getRouter()) .bodyToMono(ChannelData.class); } UserService(Router router); Mono<UserData> getCurrentUser(); Mono<UserData> getUser(long userId); Mono<UserData> modifyCurrentUser(UserModifyRequest request); Flux<UserGuildData> getCurrentUserGuilds(Map<String, Object> queryParams); Mono<Void> leaveGuild(long guildId); Flux<ChannelData> getUserDMs(); Mono<ChannelData> createDM(DMCreateRequest request); Mono<ChannelData> createGroupDM(GroupDMCreateRequest request); Flux<ConnectionData> getUserConnections();  }
@Test public void testCreateDM() { DMCreateRequest req = DMCreateRequest.builder().recipientId(Snowflake.asString(user)).build(); userService.createDM(req).block(); }