3 import io.bytom.common.Configuration;
4 import io.bytom.exception.BytomException;
5 import io.bytom.http.Client;
8 * TestUtils provides a simplified api for testing.
10 public class TestUtils {
11 public static Client generateClient_old() throws BytomException {
13 String coreURL = "http://127.0.0.1:9888";
15 return new Client(coreURL);
18 public static Client generateClient() throws BytomException {
20 String coreURL = Configuration.getValue("bytom.api.url");
21 String accessToken = Configuration.getValue("client.access.token");
23 if (coreURL == null || coreURL.isEmpty()) {
24 coreURL = "http://127.0.0.1:9888/";
27 return new Client(coreURL, accessToken);