+ @Bean
+ public MockA1ClientFactory getA1ClientFactory() {
+ PolicyTypes ricTypes = new PolicyTypes();
+ loadTypes(ricTypes);
+ return new MockA1ClientFactory(ricTypes);
+ }
+
+ @Bean
+ public Policies getPolicies() {
+ return this.policies;
+ }
+
+ @Bean
+ public PolicyTypes getPolicyTypes() {
+ return this.policyTypes;
+ }
+
+ @Bean
+ public Rics getRics() {
+ return this.rics;
+ }
+
+ private static File[] getResourceFolderFiles(String folder) {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ URL url = loader.getResource(folder);
+ String path = url.getPath();
+ return new File(path).listFiles();
+ }
+
+ private static String readFile(File file) throws IOException {
+ return new String(Files.readAllBytes(file.toPath()));
+ }