# Internal template choice

**URL:** <https://forum.canton.network/t/internal-template-choice/6058>\
**Category:** App Development\
**Created:** [February 1, 2023, 4:21pm UTC](https://forum.canton.network/t/internal-template-choice/6058 "2023-02-01T16:21:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [February 1, 2023, 4:21pm UTC](https://forum.canton.network/t/internal-template-choice/6058/1 "2023-02-01T16:21:31Z")

</div>

I have a simple template with one choice and a script that creates a contract and exercises the choice. When I run daml test, it gives the summary shown below which says that there are two choices in the template. Is there a hidden choice somewhere? How can I test that choice to make test-coverage 100%

```haskell
Test Summary

daml/Main.daml:testBankService: ok, 1 active contracts, 2 transactions.
Modules internal to this package:
- Internal templates
  1 defined
  1 (100.0%) created
- Internal template choices
  2 defined
  1 ( 50.0%) exercised

```

Here is the code:

```haskell
module BankService where 

template BankAccount 
    with
       bank: Party
       accountOwner: Party
       balance: Numeric 2
    where
        signatory bank, accountOwner

        choice Deposit: ContractId BankAccount 
            with amount: Numeric 2 
            controller accountOwner
                do 
                    create this with
                        balance = balance + amount

```

```haskell
module Main where

import Daml.Script
import BankService

testBankService : Script ()
testBankService = script do
 bank <- allocateParty "Bank"  
 alice <- allocateParty "Alice"

 aliceAccountCid <- submitMulti [bank, alice][] do
   createCmd BankAccount with
     bank
     accountOwner = alice
     balance = 100.00

 aliceAccountCid <- submit alice do
     exerciseCmd aliceAccountCid Deposit
       with
         amount = 20.00
 return ()

```

---

<div class="post-metadata">

**Author:** ![Mate\_Varga](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/mate_varga/32/2308_2.png) [@Mate\_Varga](https://forum.canton.network/u/Mate_Varga)\
**Post date:** [February 1, 2023, 4:40pm UTC](https://forum.canton.network/t/internal-template-choice/6058/2 "2023-02-01T16:40:25Z")

</div>

Hi @Neelam_Dwivedi,

Archive is a consoming choice which is implicitly defined for all templates. I’m not sure if a direct test is required for it, but that would be my guess here.

---

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [February 1, 2023, 4:48pm UTC](https://forum.canton.network/t/internal-template-choice/6058/3 "2023-02-01T16:48:36Z")

</div>

Got it! Thanks @Mate_Varga !
