ManageAudienceClientImpl implements ManageAudienceClient { @Override public CompletableFuture<GetAudienceGroupsResponse> getAudienceGroups( long page, String description, AudienceGroupStatus status, Long size, Boolean includesExternalPublicGroups, AudienceGroupCreateRoute createRoute) { return toFuture(retrofitImpl.getAudienceGroups( page, description, status, size, includesExternalPublicGroups, createRoute)); }  @Override CompletableFuture<CreateAudienceGroupResponse> createAudienceGroup(
            CreateAudienceGroupRequest request); @Override CompletableFuture<BotApiResponse> addAudienceToAudienceGroup(
            AddAudienceToAudienceGroupRequest request); @Override CompletableFuture<CreateClickBasedAudienceGroupResponse> createClickBasedAudienceGroup(
            CreateClickBasedAudienceGroupRequest request); @Override CompletableFuture<CreateImpBasedAudienceGroupResponse> createImpBasedAudienceGroup(
            CreateImpBasedAudienceGroupRequest request); @Override CompletableFuture<BotApiResponse> updateAudienceGroupDescription(
            long audienceGroupId, UpdateAudienceGroupDescriptionRequest request); @Override CompletableFuture<BotApiResponse> deleteAudienceGroup(long audienceGroupId); @Override CompletableFuture<GetAudienceGroupsResponse> getAudienceGroups(
            long page, String description, AudienceGroupStatus status, Long size,
            Boolean includesExternalPublicGroups, AudienceGroupCreateRoute createRoute); @Override CompletableFuture<GetAudienceDataResponse> getAudienceData(long audienceGroupId); @Override CompletableFuture<GetAudienceGroupAuthorityLevelResponse> getAudienceGroupAuthorityLevel(); @Override CompletableFuture<BotApiResponse> updateAudienceGroupAuthorityLevel(
            @Body UpdateAudienceGroupAuthorityLevelRequest request);  }
@Test public void getAudienceGroups() throws Exception { final GetAudienceGroupsResponse response = GetAudienceGroupsResponse .builder() .audienceGroups(singletonList(AudienceGroup.builder() .audienceGroupId(3L) .type(AudienceGroupType.IMP) .description("hello") .status(AudienceGroupStatus.EXPIRED) .failedType(null) .audienceCount(3L) .created(1583540070193L) .requestId("6744d281-c0bd-4a63-91d5-cab659827828") .clickUrl(null) .isIfaAudience(false) .permission(AudienceGroupPermission.READ_WRITE) .createRoute(AudienceGroupCreateRoute.OA_MANAGER) .build())) .hasNextPage(true) .totalCount(4L) .size(1L) .page(1L) .readWriteAudienceGroupTotalCount(1L) .build(); whenCall(retrofitMock.getAudienceGroups(anyLong(), any(), any(), any(), any(), any()), response); final GetAudienceGroupsResponse actual = target.getAudienceGroups(1L, null, null, 40L, null, null).get(); verify(retrofitMock, only()).getAudienceGroups(1L, null, null, 40L, null, null); assertThat(actual).isEqualTo(response); }