public PluginManager getPluginManager() {
        if (pluginManager != null) {
            return pluginManager;
        }
        throw new IllegalStateException("PluginManager reference is not set");
    }
@Test
    public void testGetPluginManager() throws Exception {
        PluginManagerReference reference = PluginManagerReference.reference();
        try {
            reference.getPluginManager();
            fail("should throw exception");
        } catch (IllegalStateException ignored) {
        }
        PluginManager mockManager = mock(PluginManager.class);
        reference.setPluginManager(mockManager);
        assertThat(reference.getPluginManager()).isEqualTo(mockManager);
    }