1 package com.acumenvelocity.ath.integration;
2
3 import com.fasterxml.jackson.databind.JsonNode;
4 import org.junit.jupiter.api.Test;
5
6 import static org.junit.jupiter.api.Assertions.*;
7
8 public class TestVersion_IT extends BaseIntegrationTest {
9
10 @Test
11 public void testGetVersion() throws Exception {
12 HttpResponse response = sendGetRequest("/version");
13
14 assertEquals(200, response.getStatusCode(), "Expected HTTP 200");
15
16 JsonNode json = parseJson(response.getBody());
17 assertNotNull(json.get("version"), "Version field should be present");
18
19 String version = json.get("version").asText();
20 assertFalse(version.isEmpty(), "Version should not be empty");
21
22 System.out.println("API Version: " + version);
23 }
24 }