### Question:
PropertiesLightblueClientConfiguration { public static LightblueClientConfiguration fromPath(Path pathToProperties) { try { if(pathToProperties.getFileName().toString().equals(pathToProperties.toString())) { return fromResource(pathToProperties.toString()); } else { InputStream inStream = Files.newInputStream(pathToProperties); return fromInputStream(inStream); } } catch (IOException e) { LOGGER.error(pathToProperties + " could not be found/read", e); throw new LightblueClientConfigurationException("Could not read properties file from " + "path, " + pathToProperties, e); } } private  PropertiesLightblueClientConfiguration(); static LightblueClientConfiguration fromDefault(); static LightblueClientConfiguration fromResource(String resourcePath); static LightblueClientConfiguration fromResource(String resourcePath,
                                                            ClassLoader classLoader); static LightblueClientConfiguration fromPath(Path pathToProperties); static LightblueClientConfiguration fromInputStream(InputStream propertiesStream); static LightblueClientConfiguration fromObject(Properties properties); static final String DEFAULT_CONFIG_FILE; }### Answer:
@Test public void shouldThrowMeaningfulErrorMessageIfPropertiesCantBeReadViaResourceFromPath() { Path bogusPathResource = Paths.get("this.does.not.exist.properties"); exception.expect(LightblueClientConfigurationException.class); exception.expectMessage(CoreMatchers.equalTo("Could not find properties resource at " + bogusPathResource.toString())); PropertiesLightblueClientConfiguration.fromPath(bogusPathResource); }
@Test public void shouldThrowMeaningfulErrorMessageIfPropertiesCantBeReadViaPath() throws IOException { Path bogusPath = Paths.get("/path/to/this.does.not.exist.properties"); exception.expect(LightblueClientConfigurationException.class); exception.expectCause(CoreMatchers.<Throwable>instanceOf(IOException.class)); exception.expectMessage(CoreMatchers.equalTo("Could not read properties file from path, " + bogusPath)); PropertiesLightblueClientConfiguration.fromPath(bogusPath); }