@Test public void shouldThrowInitializationExceptionWhenBatchLoadingParameterWithoutInitialization() { ParamRepository paramRepository = new TestFSParamRepository(resourceResolver); catchException(paramRepository).batchLoad(""); assertThat(caughtException()).isInstanceOf(InitializableComponentNotInitialized.class); }
@Override public ParameterBatchLoader batchLoad(String parameterName) { checkIfInitialized(); String parameterResourceName = parameters.get(parameterName); if (parameterResourceName != null) { return resourceResolver.batchLoadParameterFromResource(parameterResourceName); } return null; }
AbstractFSParamRepository implements ParamRepository, InitializableComponent { @Override public ParameterBatchLoader batchLoad(String parameterName) { checkIfInitialized(); String parameterResourceName = parameters.get(parameterName); if (parameterResourceName != null) { return resourceResolver.batchLoadParameterFromResource(parameterResourceName); } return null; } }
AbstractFSParamRepository implements ParamRepository, InitializableComponent { @Override public ParameterBatchLoader batchLoad(String parameterName) { checkIfInitialized(); String parameterResourceName = parameters.get(parameterName); if (parameterResourceName != null) { return resourceResolver.batchLoadParameterFromResource(parameterResourceName); } return null; } AbstractFSParamRepository(String basePath, String filePattern);  AbstractFSParamRepository(String basePath, String filePattern, ParamDeserializer deserializer); }
AbstractFSParamRepository implements ParamRepository, InitializableComponent { @Override public ParameterBatchLoader batchLoad(String parameterName) { checkIfInitialized(); String parameterResourceName = parameters.get(parameterName); if (parameterResourceName != null) { return resourceResolver.batchLoadParameterFromResource(parameterResourceName); } return null; } AbstractFSParamRepository(String basePath, String filePattern);  AbstractFSParamRepository(String basePath, String filePattern, ParamDeserializer deserializer); @Override void initialize(); @Override Parameter load(String parameterName); @Override ParameterBatchLoader batchLoad(String parameterName); @Override Set<ParameterEntry> findEntries(String parameterName, String[] levelValues); @Override Set<String> listParameters(); }
AbstractFSParamRepository implements ParamRepository, InitializableComponent { @Override public ParameterBatchLoader batchLoad(String parameterName) { checkIfInitialized(); String parameterResourceName = parameters.get(parameterName); if (parameterResourceName != null) { return resourceResolver.batchLoadParameterFromResource(parameterResourceName); } return null; } AbstractFSParamRepository(String basePath, String filePattern);  AbstractFSParamRepository(String basePath, String filePattern, ParamDeserializer deserializer); @Override void initialize(); @Override Parameter load(String parameterName); @Override ParameterBatchLoader batchLoad(String parameterName); @Override Set<ParameterEntry> findEntries(String parameterName, String[] levelValues); @Override Set<String> listParameters();  }