    @Test
    public void shouldNotBindSpringBeansUnderAlias() {

        // given
        TestBean bean = prepareBean("bean");
        TestBean beanWithAlias = prepareBean("beanWithAlias");
        given(applicationContext.getBeanDefinitionNames()).willReturn(new String[]{
            bean.name(),
            beanWithAlias.name()
        });
        given(applicationContext.getAliases(beanWithAlias.name())).willReturn(new String[] {"beanAlias" });

        // when
        Map<String, Object> shellContext = GroovyChange.createShellContext(applicationContext, out);

        // then
        assertFalse(shellContext.containsKey("beanWithAlias"));
        assertTrue(shellContext.containsKey("bean"));
        assertTrue(shellContext.containsKey("beanAlias"));
    }