I have been trying to play around with FHIR2 module to familiarise myself with it however I AM failing to understand how some of the methods in the tests execute at compile and run time(without throwing errors) since I cant find them in the implementing classes that are being used. An example is this test https://github.com/reagan-meant/openmrs-module-fhir2/blob/4e5301b206f84f812496ddd570c26f9e813be5fa/api-2.0/src/test/java/org/openmrs/module/fhir2/api/impl/FhirConditionServiceImpl_2_0Test.java#L47 The method here and the next line are all undefined…What could I be missing? @ibacher @dkayiwa
In the FHIR2 module, we use Project Lombok which does the boring work of writing the getters and setters for us. At the top of most classes, you’ll find an annotation like
@Setter(AccessLevel.PACKAGE), e.g., in FhirConditionDaoImpl_2_0.java. This tells Lombok to create setters with an access level of “package” for all the fields defined in the class. You can read more about that in Project Lombok’s documentation.
Wow…hadn’t come across it…powerful stuff in abstracting the boring stuff indeed…thanks alot