StoreProperties implements Cloneable { public String get(final String key) { return props.getProperty(key); } StoreProperties(); @Deprecated  StoreProperties(final String id);  StoreProperties(final Path propFileLocation); protected  StoreProperties(final Properties props, final Class<? extends Store> storeClass);  StoreProperties(final Properties props); protected  StoreProperties(final Class<? extends Store> storeClass); protected  StoreProperties(final Path propFileLocation, final Class<? extends Store> storeClass); static T loadStoreProperties(final String pathStr, final Class<T> requiredClass); static StoreProperties loadStoreProperties(final String pathStr); static T loadStoreProperties(final Path storePropertiesPath, final Class<T> requiredClass); static StoreProperties loadStoreProperties(final Path storePropertiesPath); static T loadStoreProperties(final InputStream storePropertiesStream, final Class<T> requiredClass); static StoreProperties loadStoreProperties(final InputStream storePropertiesStream); static T loadStoreProperties(final Properties props, final Class<T> requiredClass); static StoreProperties loadStoreProperties(final Properties props); String get(final String key); boolean containsKey(final Object key); String get(final String key, final String defaultValue); void set(final String key, final String value); void merge(final StoreProperties properties); @Deprecated String getId(); @Deprecated void setId(final String id); @JsonIgnore OperationDeclarations getOperationDeclarations(); String getStoreClass(); @JsonIgnore void setStoreClass(final Class<? extends Store> storeClass); void setStoreClass(final String storeClass); Boolean getJobTrackerEnabled(); void setJobTrackerEnabled(final Boolean jobTrackerEnabled); String getSchemaClassName(); Class<? extends Schema> getSchemaClass(); @JsonSetter void setSchemaClass(final String schemaClass); void setSchemaClass(final Class<? extends Schema> schemaClass); String getStorePropertiesClassName(); void setStorePropertiesClassName(final String storePropertiesClassName); Class<? extends StoreProperties> getStorePropertiesClass(); void setStorePropertiesClass(final Class<? extends StoreProperties> storePropertiesClass); String getOperationDeclarationPaths(); void setOperationDeclarationPaths(final String paths); String getReflectionPackages(); void setReflectionPackages(final String packages); Integer getJobExecutorThreadCount(); void addOperationDeclarationPaths(final String... newPaths); String getJsonSerialiserClass(); @JsonIgnore void setJsonSerialiserClass(final Class<? extends JSONSerialiser> jsonSerialiserClass); void setJsonSerialiserClass(final String jsonSerialiserClass); String getJsonSerialiserModules(); @JsonIgnore void setJsonSerialiserModules(final Set<Class<? extends JSONSerialiserModules>> modules); void setJsonSerialiserModules(final String modules); Boolean getStrictJson(); void setStrictJson(final Boolean strictJson); String getAdminAuth(); void setAdminAuth(final String adminAuth); Properties getProperties(); void setProperties(final Properties properties); @SuppressWarnings("CloneDoesntCallSuperClone") @SuppressFBWarnings(value = "CN_IDIOM_NO_SUPER_CALL", justification = "Only inherits from Object") @Override StoreProperties clone(); @Override boolean equals(final Object obj); @Override int hashCode(); void updateStorePropertiesClass(); void updateStorePropertiesClass(final Class<? extends StoreProperties> requiredClass); @Override String toString(); static final String STORE_CLASS; static final String SCHEMA_CLASS; @Deprecated
    static final String ID; static final String STORE_PROPERTIES_CLASS; static final String OPERATION_DECLARATIONS; static final String JOB_TRACKER_ENABLED; static final String EXECUTOR_SERVICE_THREAD_COUNT; static final String EXECUTOR_SERVICE_THREAD_COUNT_DEFAULT; static final String JSON_SERIALISER_CLASS; static final String JSON_SERIALISER_MODULES; static final String STRICT_JSON; static final String ADMIN_AUTH; static final String REFLECTION_PACKAGES; }
@Test public void shouldGetProperty() { final StoreProperties props = createStoreProperties(); String value = props.get("key1"); assertEquals("value1", value); }
@Test public void shouldGetPropertyWithDefaultValue() { final StoreProperties props = createStoreProperties(); String value = props.get("key1", "property not found"); assertEquals("value1", value); }
@Test public void shouldGetUnknownProperty() { final StoreProperties props = createStoreProperties(); String value = props.get("a key that does not exist"); assertNull(value); }
@Test public void shouldGetUnknownPropertyWithDefaultValue() { final StoreProperties props = createStoreProperties(); String value = props.get("a key that does not exist", "property not found"); assertEquals("property not found", value); }