@Test(expected = RuntimeException.class)
public void should_throw_runtimeException_if_error_occurs_while_initializing_workspace() throws Exception {

    doThrow(new IOException()).when(workspace).initialize();
    workspaceInitializer.contextInitialized();
}