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: capture_test.rb
    path of file: ./repos/workarea/core/test/models/workarea/payment
    
    the code of the file until where you have to start completion: require 'test_helper'

module Workarea
  class Payment
    class CaptureTest < TestCase
      setup :setup_payment

      def profile
        @profile ||= create_payment_profile(store_credit:
    
      def test_invalid_if_an_amount_exceeds_the_tenders_authorized_amount
        capture = Capture.new(
          payment: payment,
          amounts: { payment.credit_card.id => 100.to_m }
        )

        refute(capture.valid?)
        assert(capture.errors[:credit_card].present?)
      end