@Test(groups = "java6")
public void searchPatternNoAttributesFound() throws Exception {

    ObjectName patternMBean = new ObjectName("java.lang:type=*");
    JmxReadRequest request = new JmxRequestBuilder(READ, patternMBean).
            attribute(null).
            build();
    ObjectName beans[] =  {
            new ObjectName("java.lang:type=Memory"),
            new ObjectName("java.lang:type=GarbageCollection")
    };
    MBeanServer server = createMock(MBeanServer.class);
    expect(server.queryNames(patternMBean,null)).andReturn(new HashSet(Arrays.asList(beans)));
    prepareMBeanInfos(server,beans[0],new String[0]);
    prepareMBeanInfos(server,beans[1],new String[] { "gc0" });
    expect(server.getAttribute(beans[1],"gc0")).andReturn("gcval0");
    replay(server);
    Map res = (Map) handler.handleRequest(getMBeanServerManager(server), request);
    // Only a single entry fetched
    assertEquals(res.size(),1);
    verify(server);
}