HAALCENTRAAL English translation
BRP API / Personen / Features / gezag-meerderjarige-gba

authority relationships of a person of full age

#language: en

@gba
Feature: authority relationships of a person of full age


  Rule: for a minor child with two parents holding authority, a person of full age is supplied the authority relationship to both parents

    Scenario: both parents hold authority over the minor child of the person queried
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG2        | 000000024        |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG2        | 000000024        |
      | 000000012       | OG2        | 000000048        |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde                    |
      | type                             | TweehoofdigOuderlijkGezag |
      | minderjarige.burgerservicenummer | 000000012                 |
      And 'gezag' has a 'ouder' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000024 |
      And 'gezag' has a 'ouder' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000048 |


  Rule: a person of full age who holds sole authority over a minor child is supplied the authority relationship to themselves

    Scenario: only the person queried holds authority over the minor
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG1        | 000000024        |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde                   |
      | type                             | EenhoofdigOuderlijkGezag |
      | minderjarige.burgerservicenummer | 000000012                |
      | ouder.burgerservicenummer        | 000000024                |


  Rule: a person of full age who holds authority over a minor child together with their partner is supplied the authority relationship to the parent and the partner

    Scenario: the parent and the partner of that parent hold authority over the child
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000024        |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000024        |
      | 000000012       | GG         | 000000048        |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde           |
      | type                             | GezamenlijkGezag |
      | minderjarige.burgerservicenummer | 000000012        |
      | ouder.burgerservicenummer        | 000000024        |
      | derde.burgerservicenummer        | 000000048        |


  Rule: a person of full age who holds authority over a minor child of the partner is supplied the authority relationship to the parent and to themselves
    # when the non-parent is queried, the authority module supplies no gezag
    # the authority can be established by requesting the authority over the children of the partner
    # for every authority relationship of the minor children it is determined whether the non-parent holds joint authority over the child

    Scenario: the person holds joint authority by operation of law over the minor child of the partner of that person
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000024        |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000024        |
      | 000000012       | GG         | 000000048        |
      And the person with citizen service number '000000048' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person with citizen service number '000000048' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde           |
      | type                             | GezamenlijkGezag |
      | minderjarige.burgerservicenummer | 000000012        |
      | ouder.burgerservicenummer        | 000000024        |
      | derde.burgerservicenummer        | 000000048        |

    Scenario: the person holds joint authority by operation of law over some of the minor children of the partner
      Given the person with citizen service number '000000048' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000061                   |
      And the following authority relationships apply to the person with citizen service number '000000048'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000048        |
      | 000000024       | GG         | 000000048        |
      | 000000036       | GG         | 000000048        |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000048        |
      | 000000012       | GG         | 000000061        |
      And the person with citizen service number '000000024' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | GG         | 000000061        |
      | 000000024       | GG         | 000000048        |
      And the person with citizen service number '000000036' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000036'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000036       | GG         | 000000048        |
      | 000000036       | GG         | 000000073        |
      And the person with citizen service number '000000061' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the person with citizen service number '000000061' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000061                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde           |
      | type                             | GezamenlijkGezag |
      | minderjarige.burgerservicenummer | 000000012        |
      | ouder.burgerservicenummer        | 000000048        |
      | derde.burgerservicenummer        | 000000061        |
      And the person has a 'gezag' with the following data
      | naam                             | waarde           |
      | type                             | GezamenlijkGezag |
      | minderjarige.burgerservicenummer | 000000024        |
      | ouder.burgerservicenummer        | 000000048        |
      | derde.burgerservicenummer        | 000000061        |

    Scenario: the person holds no authority over the minor child of the partner
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG2        | 000000024        |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person has a parent '2' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG2        | 000000024        |
      | 000000012       | OG2        | 000000036        |
      And the person with citizen service number '000000048' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person with citizen service number '000000048' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person without authority

    Scenario: the person holds authority over a child of their own and holds joint authority by operation of law over the minor child of the partner
      Given the person with citizen service number '000000036' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000036'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000036        |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | GG         | 000000036        |
      | 000000012       | GG         | 000000048        |
      And the person with citizen service number '000000048' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000048'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | OG2        | 000000048        |
      And the person with citizen service number '000000024' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | OG2        | 000000048        |
      | 000000024       | OG2        | 000000061        |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde           |
      | type                             | GezamenlijkGezag |
      | minderjarige.burgerservicenummer | 000000012        |
      | ouder.burgerservicenummer        | 000000036        |
      | derde.burgerservicenummer        | 000000048        |
      And the person has a 'gezag' with the following data
      | naam                             | waarde                    |
      | type                             | TweehoofdigOuderlijkGezag |
      | minderjarige.burgerservicenummer | 000000024                 |
      And 'gezag' has a 'ouder' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000048 |
      And 'gezag' has a 'ouder' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000061 |

    Scenario Outline: for the minor child of the partner <omschrijving>
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the person with citizen service number '000000024' has no authority relationships
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag    | bsnMeerderjarige |
      | 000000012       | <soort gezag> | <meerderjarige>  |
      And the person with citizen service number '000000048' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person with citizen service number '000000048' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person without authority

      Examples:
      | soort gezag | omschrijving                      | meerderjarige |
      | N           | kan het gezag niet bepaald worden |               |
      | G           | is er tijdelijk geen gezag        |               |
      | OG1         | heeft alleen de ouder gezag       | 000000024     |


  Rule: a person of full age is supplied no authority relationship for a child of full age

    Scenario: gezag is requested for a parent with a child of full age
      Given the person with citizen service number '000000012' has the following data
      | naam                  | waarde   |
      | geboortedatum (03.10) | 20040730 |
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person with citizen service number '000000012' has no authority relationships
      And the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person with citizen service number '000000024' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person without authority


  Rule: a person of full age is supplied no authority relationship for a minor child whose authority cannot be determined

    Scenario: the authority over the minor child cannot be determined
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person with citizen service number '000000024' has no authority relationships
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | N          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person without authority


  Rule: a person of full age is supplied no authority relationship for a minor child over whom no one temporarily holds authority

    Scenario: no one temporarily holds authority over a minor child
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has the following 'gezagsverhouding' data
      | naam                               | waarde |
      | indicatie curateleregister (33.10) | 1      |
      And the person with citizen service number '000000024' has no authority relationships
      And the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | G          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person without authority


  Rule: a person of full age who holds authority by operation of law over a minor who is not a child of that person is supplied the authority relationship to themselves
    # when the non-parent is queried, the authority module supplies no gezag
    # the authority can be established by requesting the authority over the children of the (former) partner or partners
    # for every authority relationship of the minor children it is determined whether the non-parent is the guardian of this child

    Scenario: the partner of a deceased parent holds authority over the minor children
      Given the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | V          | 000000048        |
      And the person with citizen service number '000000024' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | V          | 000000048        |
      And the person with citizen service number '000000036' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person has the following 'overlijden' data
      | naam                     | waarde   |
      | datum overlijden (08.10) | 20231001 |
      And the person with citizen service number '000000036' has no authority relationships
      And the person with citizen service number '000000048' has a 'partner' with the following data
      | burgerservicenummer (01.20) | datum huwelijkssluiting/aangaan geregistreerd partnerschap (06.10) |
      | 000000036                   | 20120428                                                           |
      And the 'partner' has been changed to the following data
      | burgerservicenummer (01.20) | datum ontbinding huwelijk/geregistreerd partnerschap (07.10) | reden ontbinding huwelijk/geregistreerd partnerschap (07.40) |
      | 000000036                   | 20231001                                                     | O                                                            |
      And the person with citizen service number '000000048' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde    |
      | type                             | Voogdij   |
      | minderjarige.burgerservicenummer | 000000012 |
      And 'gezag' has a 'derde' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000048 |
      And the person has a 'gezag' with the following data
      | naam                             | waarde    |
      | type                             | Voogdij   |
      | minderjarige.burgerservicenummer | 000000024 |
      And 'gezag' has a 'derde' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000048 |

    Scenario: the partner of a parent under guardianship holds authority over one minor child, but not over all the children
      Given the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000061                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | N          |                  |
      And the person with citizen service number '000000024' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000061                   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | V          | 000000073        |
      And the person with citizen service number '000000036' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000061                   |
      And the following authority relationships apply to the person with citizen service number '000000036'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000036       | OG1        | 000000152        |
      And the person with citizen service number '000000048' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000061                   |
      And the person with citizen service number '000000048' has no authority relationships
      And the person with citizen service number '000000061' has the following 'gezagsverhouding' data
      | naam                               | waarde |
      | indicatie curateleregister (33.10) | 1      |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000073                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the person with citizen service number '000000061' has no authority relationships
      And the person with citizen service number '000000073' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000061                   |
      And the person with citizen service number '000000073' has no authority relationships
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000073                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde    |
      | type                             | Voogdij   |
      | minderjarige.burgerservicenummer | 000000024 |
      And 'gezag' has a 'derde' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000073 |

    Scenario: the partner of a deceased parent holds authority over the minor children and by now has another partner
      Given the person with citizen service number '000000012' has a parent '1' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | V          | 000000048        |
      And the person with citizen service number '000000036' has a 'partner' with the following data
      | burgerservicenummer (01.20) |
      | 000000048                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has the following 'overlijden' data
      | naam                     | waarde   |
      | datum overlijden (08.10) | 20231001 |
      And the person with citizen service number '000000036' has no authority relationships
      And the person with citizen service number '000000048' has a 'partner' with the following data
      | burgerservicenummer (01.20) | datum huwelijkssluiting/aangaan geregistreerd partnerschap (06.10) |
      | 000000036                   | 20120428                                                           |
      And the 'partner' has been changed to the following data
      | burgerservicenummer (01.20) | datum ontbinding huwelijk/geregistreerd partnerschap (07.10) | reden ontbinding huwelijk/geregistreerd partnerschap (07.40) |
      | 000000036                   | 20191001                                                     | O                                                            |
      And the person has a 'partner' with the following data
      | burgerservicenummer (01.20) | datum huwelijkssluiting/aangaan geregistreerd partnerschap (06.10) |
      | 000000061                   | 20230614                                                           |
      And the person with citizen service number '000000048' has no authority relationships
      And the person with citizen service number '000000061' has a 'partner' with the following data
      | burgerservicenummer (01.20) | datum huwelijkssluiting/aangaan geregistreerd partnerschap (06.10) |
      | 000000048                   | 20230614                                                           |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde    |
      | type                             | Voogdij   |
      | minderjarige.burgerservicenummer | 000000012 |
      And 'gezag' has a 'derde' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000048 |
  

  Rule: a person registered in the RNI is supplied gezag niet te bepalen where the age is below 18
    # for a person registered in the RNI (municipality of registration equals 1999), the authority module always supplies soort gezag 'N' (cannot be determined)
    # where it is certain that the person is of full age, no 'gezag niet te bepalen' must be supplied
    # where the age can be determined exactly (see ../leeftijd/overzicht.feature), 'gezag niet te bepalen' is supplied only where the age is below 18

    Scenario Outline: the authority over a minor in the RNI cannot be determined
      Given the person with citizen service number '000000024' has the following data
      | naam                  | waarde          |
      | geboortedatum (03.10) | <geboortedatum> |
      And the person has the following 'verblijfplaats' data
      | naam                              | waarde |
      | gemeente van inschrijving (09.10) | 1999   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | N          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam | waarde             |
      | type | GezagNietTeBepalen |

      Examples:
      | geboortedatum            | berekende leeftijd |
      | gisteren - 5 jaar        | 5                  |
      | vandaag - 17 jaar        | 17                 |
      | morgen - 18 jaar         | 17                 |
      | vorige maand - 10 jaar   | 10                 |
      | vorige maand - 17 jaar   | 17                 |
      | volgende maand - 18 jaar | 17                 |

    Scenario Outline: no gezag is supplied for a person of full age in the RNI
      Given the person with citizen service number '000000024' has the following data
      | naam                  | waarde          |
      | geboortedatum (03.10) | <geboortedatum> |
      And the person has the following 'verblijfplaats' data
      | naam                              | waarde |
      | gemeente van inschrijving (09.10) | 1999   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | N          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person without authority

      Examples:
      | geboortedatum            | berekende leeftijd |
      | 19590210                 | 65+                |
      | vandaag - 18 jaar        | 18                 |
      | vorige maand - 18 jaar   | 18                 |
      | volgende maand - 19 jaar | 18                 |


  Rule: a person registered in the RNI with an incomplete date of birth is supplied gezag niet te bepalen where the year of birth is at least 19 years before the current year
    # where the age cannot be determined exactly but a year of birth is known, 'gezag niet te bepalen' is supplied only where the person was already of full age (18) at the start of the year

    Scenario Outline: the authority over a minor in the RNI cannot be determined
      Given the person with citizen service number '000000024' has the following data
      | naam                  | waarde          |
      | geboortedatum (03.10) | <geboortedatum> |
      And the person has the following 'verblijfplaats' data
      | naam                              | waarde |
      | gemeente van inschrijving (09.10) | 1999   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | N          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam | waarde             |
      | type | GezagNietTeBepalen |

      Examples:
      | geboortedatum        | leeftijd      |
      | deze maand - 5 jaar  | 4 of 5 jaar   |
      | dit jaar - 5 jaar    | 4 of 5 jaar   |
      | deze maand - 18 jaar | 17 of 18 jaar |
      | dit jaar - 18 jaar   | 17 of 18 jaar |

    Scenario Outline: no gezag is supplied for a person of full age in the RNI
      Given the person with citizen service number '000000024' has the following data
      | naam                  | waarde          |
      | geboortedatum (03.10) | <geboortedatum> |
      And the person has the following 'verblijfplaats' data
      | naam                              | waarde |
      | gemeente van inschrijving (09.10) | 1999   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | N          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person without authority

      Examples:
      | geboortedatum        | leeftijd      |
      | deze maand - 35 jaar | 34 of 35 jaar |
      | dit jaar - 35 jaar   | 34 of 35 jaar |
      | deze maand - 19 jaar | 18 of 19 jaar |
      | dit jaar - 19 jaar   | 18 of 19 jaar |


  Rule: a person registered in the RNI is supplied gezag niet te bepalen where the date of birth is entirely unknown

    Scenario: the authority over a minor in the RNI cannot be determined
      Given the person with citizen service number '000000024' has the following data
      | naam                  | waarde   |
      | geboortedatum (03.10) | 00000000 |
      And the person has the following 'verblijfplaats' data
      | naam                              | waarde |
      | gemeente van inschrijving (09.10) | 1999   |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | N          |                  |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam | waarde             |
      | type | GezagNietTeBepalen |


  Rule: a person of full age with authority over several minors is supplied the authority relationships of all those minors

    Scenario: a person of full age holds authority over several children
      Given the person with citizen service number '000000048' has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000012                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000024                   |
      And the person has a 'kind' with the following data
      | burgerservicenummer (01.20) |
      | 000000036                   |
      And the following authority relationships apply to the person with citizen service number '000000048'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG2        | 000000048        |
      | 000000024       | OG1        | 000000048        |
      | 000000036       | GG         | 000000048        |
      And the following authority relationships apply to the person with citizen service number '000000012'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000012       | OG2        | 000000048        |
      | 000000012       | OG2        | 000000061        |
      And the following authority relationships apply to the person with citizen service number '000000024'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000024       | OG1        | 000000048        |
      And the following authority relationships apply to the person with citizen service number '000000036'
      | bsnMinderjarige | soortGezag | bsnMeerderjarige |
      | 000000036       | GG         | 000000048        |
      | 000000036       | GG         | 000000073        |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | gezag                           |
      Then the response has a person with a 'gezag' with the following data
      | naam                             | waarde                    |
      | type                             | TweehoofdigOuderlijkGezag |
      | minderjarige.burgerservicenummer | 000000012                 |
      And 'gezag' has a 'ouder' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000048 |
      And 'gezag' has a 'ouder' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000061 |
      And the person has a 'gezag' with the following data
      | naam                             | waarde                   |
      | type                             | EenhoofdigOuderlijkGezag |
      | minderjarige.burgerservicenummer | 000000024                |
      | ouder.burgerservicenummer        | 000000048                |
      And the person has a 'gezag' with the following data
      | naam                             | waarde           |
      | type                             | GezamenlijkGezag |
      | minderjarige.burgerservicenummer | 000000036        |
      | ouder.burgerservicenummer        | 000000048        |
      | derde.burgerservicenummer        | 000000073        |