### Question:
DhisToFhirTransformerRequestImpl implements DhisToFhirTransformerRequest { @Override public boolean isSimpleFhirIdRule() { return simpleFhirIdRule; } DhisToFhirTransformerRequestImpl( @Nonnull DhisToFhirTransformerContext context, @Nullable ScriptedDhisResource input, @Nonnull FhirClient fhirClient, @Nonnull List<RuleInfo<? extends AbstractRule>> rules,
        @Nonnull Map<String, DhisToFhirTransformerUtils> transformerUtils ); @Nonnull @Override DhisToFhirTransformerContext getContext(); @Nonnull @Override ScriptedDhisResource getInput(); void setInput( @Nonnull ScriptedDhisResource input ); @Nonnull @Override FhirClient getFhirClient(); @Nonnull List<RuleInfo<? extends AbstractRule>> getRules(); @Nonnull Map<String, DhisToFhirTransformerUtils> getTransformerUtils(); @Nonnull @Override UUID getRuleId(); @Override boolean isSimpleFhirIdRule(); final boolean isFirstRule(); final boolean isLastRule(); final boolean isSingleRule(); @Nullable RuleInfo<? extends AbstractRule> nextRule();  }### Answer:
@Test public void isSimpleFhirId() { final List<RuleInfo<? extends AbstractRule>> ruleInfos = new ArrayList<>(); final TrackedEntityRule trackedEntityRule = new TrackedEntityRule(); trackedEntityRule.setSimpleFhirId( true ); ruleInfos.add( new RuleInfo<>( trackedEntityRule, Collections.emptyList() ) ); final DhisToFhirTransformerRequestImpl transformerRequest = new DhisToFhirTransformerRequestImpl( context, input, fhirClient, ruleInfos, transformerUtils ); Assert.assertTrue( transformerRequest.isSimpleFhirIdRule() ); }
@Test public void isNotSimpleFhirId() { final List<RuleInfo<? extends AbstractRule>> ruleInfos = new ArrayList<>(); final TrackedEntityRule trackedEntityRule = new TrackedEntityRule(); trackedEntityRule.setSimpleFhirId( false ); ruleInfos.add( new RuleInfo<>( trackedEntityRule, Collections.emptyList() ) ); final DhisToFhirTransformerRequestImpl transformerRequest = new DhisToFhirTransformerRequestImpl( context, input, fhirClient, ruleInfos, transformerUtils ); Assert.assertFalse( transformerRequest.isSimpleFhirIdRule() ); }
@Test public void isNotSimpleFhirIdMultiple() { final List<RuleInfo<? extends AbstractRule>> ruleInfos = new ArrayList<>(); final TrackedEntityRule trackedEntityRule1 = new TrackedEntityRule(); trackedEntityRule1.setSimpleFhirId( false ); final TrackedEntityRule trackedEntityRule2 = new TrackedEntityRule(); trackedEntityRule2.setSimpleFhirId( false ); ruleInfos.add( new RuleInfo<>( trackedEntityRule1, Collections.emptyList() ) ); ruleInfos.add( new RuleInfo<>( trackedEntityRule2, Collections.emptyList() ) ); final DhisToFhirTransformerRequestImpl transformerRequest = new DhisToFhirTransformerRequestImpl( context, input, fhirClient, ruleInfos, transformerUtils ); Assert.assertFalse( transformerRequest.isSimpleFhirIdRule() ); }