class GaugesService {

    public List<Gauge> getGauges() throws IOException {
        try {
            HttpRequest request = execute(HttpRequest.get(URL_EMBEDDED));
            GaugesWrapper response = fromJson(request, GaugesWrapper.class);
            if (response != null && response.gauges != null)
                return response.gauges;
            return Collections.emptyList();
        } catch (HttpRequestException e) {
            throw e.getCause();
        }
    }

}

class GaugesServiceTest {

    @Mock
    private HttpRequest request;
    private GaugesService service;

    @Test
    public void getGaugesEmptyResponse() throws IOException {

        doReturn(createReader("")).when(request).bufferedReader();
        List<Gauge> gauges = service.getGauges();
        assertNotNull(gauges);
        assertTrue(gauges.isEmpty());
    }

}