### Question:
R4EnrollmentToFhirCarePlanTransformer extends AbstractEnrollmentToFhirCarePlanTransformer { @Nonnull protected CarePlan.CarePlanStatus convertStatus( @Nonnull EnrollmentStatus enrollmentStatus ) { switch ( enrollmentStatus ) { case ACTIVE: return CarePlan.CarePlanStatus.ACTIVE; case COMPLETED: return CarePlan.CarePlanStatus.COMPLETED; case CANCELLED: return CarePlan.CarePlanStatus.REVOKED; default: throw new AssertionError( "Invalid enrollment status: " + enrollmentStatus ); } } R4EnrollmentToFhirCarePlanTransformer( @Nonnull ScriptExecutor scriptExecutor, @Nonnull LockManager lockManager, @Nonnull SystemRepository systemRepository, @Nonnull FhirResourceRepository fhirResourceRepository,
        @Nonnull FhirResourceMappingRepository resourceMappingRepository, @Nonnull FhirDhisAssignmentRepository fhirDhisAssignmentRepository, @Nonnull TrackedEntityMetadataService trackedEntityMetadataService,
        @Nonnull TrackedEntityRuleRepository trackedEntityRuleRepository, @Nonnull ProgramMetadataService programMetadataService ); @Nonnull @Override Set<FhirVersion> getFhirVersions();  }### Answer:
@Test public void convertStatusActive() { Assert.assertEquals( CarePlan.CarePlanStatus.ACTIVE, transformer.convertStatus( EnrollmentStatus.ACTIVE ) ); }
@Test public void convertStatusCompleted() { Assert.assertEquals( CarePlan.CarePlanStatus.COMPLETED, transformer.convertStatus( EnrollmentStatus.COMPLETED ) ); }
@Test public void convertStatusCancelled() { Assert.assertEquals( CarePlan.CarePlanStatus.REVOKED, transformer.convertStatus( EnrollmentStatus.CANCELLED ) ); }