*
* @throws Exception
*/
@Test
public void setRepositoryThrowsIOException() throws Exception {
NoteContentFilter filter = new NoteContentFilter();
final IOException exception = new IOException("message");
Repository repo = new BadRepository(testRepo, exception);
try {
filter.setRepository(repo);
fail("Exception not thrown when reading bad refs");
} catch (GitException e) {
assertNotNull(e);
assertEquals(exception, e.getCause());
}