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

    ObjectName patternMBean = new ObjectName("java.lang:type=*");
    JmxReadRequest[] requests = new JmxReadRequest[2];
    requests[0] =
            new JmxRequestBuilder(READ, patternMBean).
                    attribute(null).
                    build();
    requests[1] =
            new JmxRequestBuilder(READ, patternMBean).
                    // A single null element is enough to denote "all"
                    attributes(Arrays.asList((String) null)).
                    build();
    for (JmxReadRequest request : requests) {
        ObjectName beans[] =  {
                new ObjectName("java.lang:type=Memory"),
                new ObjectName("java.lang:type=GarbageCollection")
        };
        MBeanServer server = prepareMultiAttributeTest(patternMBean, beans);
        expect(server.getAttribute(beans[0],"mem0")).andReturn("memval0");
        expect(server.getAttribute(beans[0],"mem1")).andReturn("memval1");
        expect(server.getAttribute(beans[0],"common")).andReturn("commonVal0");
        expect(server.getAttribute(beans[1],"gc0")).andReturn("gcval0");
        expect(server.getAttribute(beans[1],"gc1")).andReturn("gcval1");
        expect(server.getAttribute(beans[1],"gc3")).andReturn("gcval3");
        expect(server.getAttribute(beans[1],"common")).andReturn("commonVal1");
        replay(server);
        Map res = (Map) handler.handleRequest(getMBeanServerManager(server), request);
        assertEquals("memval0",((Map) res.get("java.lang:type=Memory")).get("mem0"));
        assertEquals("memval1",((Map) res.get("java.lang:type=Memory")).get("mem1"));
        assertEquals("commonVal0",((Map) res.get("java.lang:type=Memory")).get("common"));
        assertEquals("gcval0",((Map) res.get("java.lang:type=GarbageCollection")).get("gc0"));
        assertEquals("gcval1",((Map) res.get("java.lang:type=GarbageCollection")).get("gc1"));
        assertEquals("gcval3",((Map) res.get("java.lang:type=GarbageCollection")).get("gc3"));
        assertEquals("commonVal1",((Map) res.get("java.lang:type=GarbageCollection")).get("common"));
        verify(server);
    }
}