test_class.declarator: localesService
test_class.modifier: @SpyBean
      private
test_class.original_string: @SpyBean
      private LocalesService localesService;
test_class.type: LocalesService
test_class.var_name: localesService
test_class.declarator: discoveryUtils
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private DiscoveryUtils discoveryUtils;
test_class.type: DiscoveryUtils
test_class.var_name: discoveryUtils
test_class.declarator: modulesService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private ModulesService modulesService;
test_class.type: ModulesService
test_class.var_name: modulesService
test_class.declarator: wireMockRule = new WireMockRule(8089)
test_class.modifier: @ClassRule
      static public
test_class.original_string: @ClassRule
      static public WireMockRule wireMockRule = new WireMockRule(8089);
test_class.type: WireMockRule
test_class.var_name: wireMockRule
test_class.file: api-gateway/src/test/java/fr/sictiam/stela/apigateway/service/LocalesServiceTest.java
test_class.identifier: LocalesServiceTest
test_case.body: @Test
      public void getApiGatewayJsonTranslation() {
          String jsonTranslation = localesService.getJsonTranslation("api-gateway", "fr", "api-gateway");
  
          verifyZeroInteractions(discoveryUtils);
          verifyZeroInteractions(modulesService);
          assertThat(jsonTranslation, notNullValue());
      }
test_case.class_method_signature: LocalesServiceTest.getApiGatewayJsonTranslation()
test_case.full_signature: @Test public void getApiGatewayJsonTranslation()
test_case.identifier: getApiGatewayJsonTranslation
test_case.invocations: getJsonTranslation verifyZeroInteractions verifyZeroInteractions assertThat notNullValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getApiGatewayJsonTranslation()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(LocalesService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(LocalesService.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: restTemplate
focal_class.modifier: private final
focal_class.original_string: private final RestTemplate restTemplate;
focal_class.type: RestTemplate
focal_class.var_name: restTemplate
focal_class.declarator: discoveryUtils
focal_class.modifier: private final
focal_class.original_string: private final DiscoveryUtils discoveryUtils;
focal_class.type: DiscoveryUtils
focal_class.var_name: discoveryUtils
focal_class.declarator: modulesService
focal_class.modifier: private final
focal_class.original_string: private final ModulesService modulesService;
focal_class.type: ModulesService
focal_class.var_name: modulesService
focal_class.file: api-gateway/src/main/java/fr/sictiam/stela/apigateway/service/LocalesService.java
focal_class.identifier: LocalesService
focal_class.class_method_signature: LocalesService.LocalesService(RestTemplateBuilder builder, DiscoveryUtils discoveryUtils, ModulesService modulesService)
focal_class.full_signature: public  LocalesService(RestTemplateBuilder builder, DiscoveryUtils discoveryUtils, ModulesService modulesService)
focal_class.identifier: LocalesService
focal_class.modifiers: public
focal_class.parameters: (RestTemplateBuilder builder, DiscoveryUtils discoveryUtils, ModulesService modulesService)
focal_class.signature:  LocalesService(RestTemplateBuilder builder, DiscoveryUtils discoveryUtils, ModulesService modulesService)
focal_class.class_method_signature: LocalesService.getJsonTranslation(String module, String lng, String ns)
focal_class.full_signature: public String getJsonTranslation(String module, String lng, String ns)
focal_class.identifier: getJsonTranslation
focal_class.modifiers: public
focal_class.parameters: (String module, String lng, String ns)
focal_class.return: String
focal_class.signature: String getJsonTranslation(String module, String lng, String ns)
focal_class.class_method_signature: LocalesService.buildLocalesEndpointUrl(String applicationName, String lng, String ns)
focal_class.full_signature: private String buildLocalesEndpointUrl(String applicationName, String lng, String ns)
focal_class.identifier: buildLocalesEndpointUrl
focal_class.modifiers: private
focal_class.parameters: (String applicationName, String lng, String ns)
focal_class.return: String
focal_class.signature: String buildLocalesEndpointUrl(String applicationName, String lng, String ns)
focal_method.body: public String getJsonTranslation(String module, String lng, String ns) {
          if (module.equals("api-gateway")) {
              return LocalFileUtils.getLocalFile(String.join("/","public/locales",lng, ns.concat(".json")));
          }
  
          if(modulesService.moduleHaveInstance(module)) {
              try {
                  return Objects.requireNonNull(restTemplate.getForObject(this.buildLocalesEndpointUrl(module, lng, ns), String.class));
              } catch (RestClientException e) {
                  LOGGER.warn("[getJsonTranslation] An error occured in module {} : {}", module, e.getMessage());
              }
          } else {
              LOGGER.warn("Module {} not have instance", module);
          }
          return "";
      }
focal_method.class_method_signature: LocalesService.getJsonTranslation(String module, String lng, String ns)
focal_method.full_signature: public String getJsonTranslation(String module, String lng, String ns)
focal_method.identifier: getJsonTranslation
focal_method.invocations: equals getLocalFile join concat moduleHaveInstance requireNonNull getForObject buildLocalesEndpointUrl warn getMessage warn
focal_method.modifiers: public
focal_method.parameters: (String module, String lng, String ns)
focal_method.return: String
focal_method.signature: String getJsonTranslation(String module, String lng, String ns)