@Test
public void verifyInputStreamIsClosedOnException() throws IOException {
InputStream is = null;
try {
Resource resource = mock(Resource.class);
is = mock(InputStream.class, new ThrowsException(new IOException()));
when(resource.exists()).thenReturn(true);
when(resource.getInputStream()).thenReturn(is);
PropertiesStore ps = new PropertiesStore();
ps.addResource(resource);
Assert.fail();;
} catch (ConstrettoException ce) {
verify(is).close();