@Test
public void openConnectionThrowIOException() throws IOException {

  URL url = PowerMock.createMock(URL.class);
  expect(url.openConnection()).andThrow(new IOException());
  String filename = "home.hbs";
  Object[] mocks = {url};
  PowerMock.replay(mocks);
  assertEquals(-1, new URLTemplateSource(filename, url).lastModified());
  PowerMock.verify(mocks);
}