title: How do I convert a basic server code that exposes a few REST endpoints and provides static response into an ear and deploy it in a lightweight server?
body: <p>I have written an interface and an implementation class - which exposes a few REST endpoints (eg. /mock/abc/user) and returns some static values as json response. How do I bundle these code into an ear/war and deploy them in a lightweight standalone server such as Wildfly.</p>
  <p><strong>Interface</strong></p>
  <pre><code>@Path(&quot;/mock/server&quot;)
  public interface MockServer{
  
         @Path(&quot;/user&quot;)
         @GET
         @Produces({MimeTypes.APPLICATION_JSON})
         Response getUserDetails();
  }
  </code></pre>
  <p><strong>Impl Class</strong></p>
  <pre><code>public class MockServerImpl implements MockServer{
      @Override
      public Response getUserDetails() {
      ...
      }
  </code></pre>
  <p>I am supposed to deploy it in a separate server and hit these endpoints from my JUnit tests.</p>