### Question:
AffordanceBuilder implements LinkBuilder { public AffordanceBuilder withType(String type) { this.linkParams.set("type", type); return this; } AffordanceBuilder();  AffordanceBuilder(PartialUriTemplateComponents partialUriTemplateComponents, List<ActionDescriptor>
            actionDescriptors); static AffordanceBuilder linkTo(Class<?> controller); static AffordanceBuilder linkTo(Class<?> controller, Object... parameters); static AffordanceBuilder linkTo(Method method, Object... parameters); static AffordanceBuilder linkTo(Class<?> controller, Map<String, ?> parameters); static AffordanceBuilder linkTo(Class<?> controller, Method method, Object... parameters); static AffordanceBuilder linkTo(Object methodInvocation); static T methodOn(Class<T> clazz, Object... parameters); Affordance build(); AffordanceBuilder reverseRel(String rev, String revertedRel); AffordanceBuilder reverseRel(String rev, String revertedRel, TypedResource object); AffordanceBuilder rel(String rel); AffordanceBuilder rel(TypedResource subject, String rel); AffordanceBuilder withTitle(String title); AffordanceBuilder withTitleStar(String titleStar); AffordanceBuilder withLinkParam(String name, String value); AffordanceBuilder withAnchor(String anchor); AffordanceBuilder withHreflang(String hreflang); AffordanceBuilder withMedia(String media); AffordanceBuilder withType(String type); @Override AffordanceBuilder slash(Object object); @Override AffordanceBuilder slash(Identifiable<?> identifiable); @Override URI toUri(); @Override Affordance withRel(String rel); @Override Affordance withSelfRel(); @Override String toString(); AffordanceBuilder and(AffordanceBuilder affordanceBuilder);  }### Answer:
@Test public void testWithType() { final Affordance affordance = AffordanceBuilder.linkTo(AffordanceBuilder.methodOn(DummyController.class) .createThing(new Thing())) .withType("application/pdf") .rel("next") .build(); Assert.assertEquals("Link: <http: affordance.toString()); }