Durante a aula fui executar o teste da classe ClienteTest e aconteceu um erro. " Class not found ClienteTest java.lang.ClassNotFoundException: ClienteTest at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:780) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:503) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) "
meu codigo
import org.junit.Test;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import junit.framework.Assert;
public class ClienteTest {
@Test
public void testaQueAConexaoComOServidorFunciona() {
Client client = ClientBuilder.newClient();
WebTarget target = client.target("http://www.mocky.io");
String conteudo = target.path("/v2/52aaf5deee7ba8c70329fb7d").request().get(String.class);
Assert.assertTrue(conteudo.contains("<rua>Rua Vergueiro 3185"));
}
}