@Override
    public void upgrade() {
        try {
            streamService.load(Stream.DEFAULT_STREAM_ID);
        } catch (NotFoundException ignored) {
            createDefaultStream();
        }
    }
@Test
    public void upgradeWithoutDefaultIndexSet() throws Exception {
        when(streamService.load("000000000000000000000001")).thenThrow(NotFoundException.class);
        when(indexSetRegistry.getDefault()).thenThrow(IllegalStateException.class);

        expectedException.expect(IllegalStateException.class);

        migration.upgrade();
    }