### Question:
PropertiesLightblueClientConfiguration { public static LightblueClientConfiguration fromInputStream(InputStream propertiesStream) { try { Properties properties = new Properties(); properties.load(loadInputStream(propertiesStream)); return fromObject(properties); } catch (IOException e) { LOGGER.error(propertiesStream + " could not be read", e); throw new LightblueClientConfigurationException("Could not read properties file from " + "input stream, " + propertiesStream, 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 shouldThrowMeaningfulErrorMessageIfPropertiesCantBeReadViaInputStream() throws IOException { InputStream inputStream = mock(InputStream.class); when(inputStream.toString()).thenReturn("stream.toString()"); when(inputStream.read(any(byte[].class))).thenThrow(IOException.class); exception.expect(LightblueClientConfigurationException.class); exception.expectCause(CoreMatchers.<Throwable>instanceOf(IOException.class)); exception.expectMessage(CoreMatchers.equalTo("Could not read properties file from input stream, " + inputStream)); PropertiesLightblueClientConfiguration.fromInputStream(inputStream); }