@Test
  public void testFullAppGet() throws Exception {
    Response response =
        applicationResource.getApplication(
            Version.V2.name(), MediaType.APPLICATION_JSON, EurekaAccept.full.name());

    String json = String.valueOf(response.getEntity());
    DecoderWrapper decoder = CodecWrappers.getDecoder(CodecWrappers.LegacyJacksonJson.class);

    Application decodedApp = decoder.decode(json, Application.class);
    assertThat(EurekaEntityComparators.equal(testApplication, decodedApp), is(true));
  }
  @Test
  public void testMiniAppGet() throws Exception {
    Response response =
        applicationResource.getApplication(
            Version.V2.name(), MediaType.APPLICATION_JSON, EurekaAccept.compact.name());

    String json = String.valueOf(response.getEntity());
    DecoderWrapper decoder = CodecWrappers.getDecoder(CodecWrappers.LegacyJacksonJson.class);

    Application decodedApp = decoder.decode(json, Application.class);
    // assert false as one is mini, so should NOT equal
    assertThat(EurekaEntityComparators.equal(testApplication, decodedApp), is(false));

    for (InstanceInfo instanceInfo : testApplication.getInstances()) {
      InstanceInfo decodedInfo = decodedApp.getByInstanceId(instanceInfo.getId());
      assertThat(EurekaEntityComparators.equalMini(instanceInfo, decodedInfo), is(true));
    }
  }
 public EurekaJersey2ClientBuilder withDecoder(String decoderName, String clientDataAccept) {
   return this.withDecoderWrapper(CodecWrappers.resolveDecoder(decoderName, clientDataAccept));
 }
 public EurekaJersey2ClientBuilder withEncoder(String encoderName) {
   return this.withEncoderWrapper(CodecWrappers.getEncoder(encoderName));
 }