@GetMapping("/{memberId}/products")
    public ResponseEntity<List<ProductByMemberResponse>> findProductHistories(
            @PathVariable("memberId") final Long memberId,
            @AuthMember final Long authId
    ) {
        return ResponseEntity.ok(memberService.findProductHistories(memberId, authId));
    }
@Test
    void 상품_판매_내역을_조회한다() throws Exception {
        // given
        when(memberService.findProductHistories(anyLong(), anyLong()))
                .thenReturn(List.of(new ProductByMemberResponse(1L, 1L, "상품명", 10000, Location.BUILDING_CENTER, ProductStatus.WAITING, LocalDateTime.now())));

        // when & then
        mockMvc.perform(get("/api/members/{memberId}/products", 1L)
                        .header(HttpHeaders.AUTHORIZATION, "Bearer tokenInfo~")
                ).andExpect(status().isOk())
                .andDo(customDocument("find_member_products",
                        requestHeaders(
                                headerWithName(AUTHORIZATION).description("유저 토큰 정보")
                        ),
                        responseFields(
                                fieldWithPath("[0].productId").description("상품 id"),
                                fieldWithPath("[0].sellerId").description("판매자 id"),
                                fieldWithPath("[0].title").description("상품 제목"),
                                fieldWithPath("[0].price").description("상품 가격"),
                                fieldWithPath("[0].location").description("상품 거래 장소"),
                                fieldWithPath("[0].productStatus").description("상품 거래 상태"),
                                fieldWithPath("[0].createTime").description("상품 업로드 날짜")
                        )
                ));
    }