@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("{networkId}/devices")
    public Response getVirtualDevices(@PathParam("networkId") long networkId) {
        NetworkId nid = NetworkId.networkId(networkId);
        Set<VirtualDevice> vdevs = vnetService.getVirtualDevices(nid);
        return ok(encodeArray(VirtualDevice.class, "devices", vdevs)).build();
    }
@Test
    public void testGetVirtualDevicesEmptyArray() {
        NetworkId networkId = networkId4;
        expect(mockVnetService.getVirtualDevices(networkId)).andReturn(ImmutableSet.of()).anyTimes();
        replay(mockVnetService);

        WebTarget wt = target();
        String location = "vnets/" + networkId.toString() + "/devices";
        String response = wt.path(location).request().get(String.class);
        assertThat(response, is("{\"devices\":[]}"));

        verify(mockVnetService);
    }