@GET
    @Path("/service")
    public Uni<List<Record>> getByType(@QueryParam("type") String type,
                                       @QueryParam("includeOutOfService") Boolean includeOutOfService) {
        Uni<List<Record>> results;
        if (includeOutOfService != null) {
            results = provider.getServiceByType(type, includeOutOfService);
        } else {
            results = provider.getServiceByType(type);
        }

        return results;
    }
@Test
    public void testGetByType() {
        ServiceRegistration service = createTestService();

        // register the service
        Response registerResponse = given()
                .body(service)
                .contentType(MediaType.APPLICATION_JSON)
                .post("/service-discovery/registry");

        // send request to get services by name
        Response getResponse = given()
                .queryParam("type", service.getType())
                .when()
                .get("service-discovery/service");

        // verify expected response and extract the returned list
        List<Map<String, Object>> results = getResponse.then()
                .statusCode(200)
                .extract()
                .as(List.class);

        // verify expected results from the get request
        assertEquals(1, results.size(), "Unexpected number of services returned");

        Object expectedRegistrationId = registerResponse.jsonPath().get("registration");
        Object actualRegistrationId = results.get(0).get("registration");
        assertEquals(expectedRegistrationId, actualRegistrationId, "Unexpected service returned");
    }