@Test
public void findMyOrderPriceSum_로그인사용자의_주문상품금액합계가_반환된다 () throws Exception {

    //given
    Customer customer = customerRepository.save(
            Customer.builder()
                    .name("jojoldu")
                    .email("jojoldu@gmail.com")
                    .mobileNumber("01011239877")
                    .build()
    );
    //세션에 저장
    httpSession.setAttribute("loginUser", customer);
    Product 키보드 = productRepository.save(
            Product.builder()
                    .name("키보드")
                    .manufactureDate(LocalDate.of(2017,9,19))
                    .price(10000)
                    .build()
    );
    Product 마우스 = productRepository.save(
            Product.builder()
                    .name("마우스")
                    .manufactureDate(LocalDate.of(2017,9,19))
                    .price(15000)
                    .build()
    );
    CustomerOrder customerOrder = customerOrderRepository.save(
            CustomerOrder.builder()
                    .customer(customer)
                    .address("장은빌딩")
                    .orderDateTime(LocalDateTime.of(2017,9,19,20,0))
                    .isGiftPackaging(true)
                    .build()
    );
    customerOrder.addProduct(키보드);
    customerOrder.addProduct(마우스);
    customerOrderRepository.save(customerOrder);
    //when
    long sum = customerService.findMyOrderPriceSum();
    //then
    assertThat(sum, is(25000L));
}