You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: order_item_details_test.rb
    path of file: ./repos/workarea/core/test/queries/workarea
    
    the code of the file until where you have to start completion: require 'test_helper'

module Workarea
  class OrderItemDetailsTest < Workarea::TestCase
    def test_find_bang_without_product
      assert_raises OrderItemDetails::InvalidPurchase do
        OrderItemDetails.find!('SKU1')
      end
    end

    def test_find_without_product
      assert_nil(OrderItemDetails.find('SKU1
    
    def test_to_h
      product = create_product(id: "840B898080", variants: [{ sku: 'SKU', regular: 5.00 }])
      # we lose time precision on created_at/updated_at when storing in the database
      # reload the product to truncate the timestamps
      product.reload
      details = OrderItemDetails.find!('SKU').to_h

      assert_equal("840B898080", details[:product_id])
      assert_equal(product.as_document, details[:product_attributes])
    end