@Test public void whenSerializationDontAcceptsFormatItShouldntBeUsed() throws Exception { when(formatResolver.getAcceptFormat()).thenReturn("xml"); when(serialization.accepts("xml")).thenReturn(false); Object object = new Object(); representation.from(object); verify(serialization, never()).from(object); }
public <T> Serializer from(T object) { return from(object, null); }
DefaultRepresentationResult implements RepresentationResult { public <T> Serializer from(T object) { return from(object, null); } }
DefaultRepresentationResult implements RepresentationResult { public <T> Serializer from(T object) { return from(object, null); } DefaultRepresentationResult(FormatResolver formatResolver, Result result, List<Serialization> serializations, RestHeadersHandler headersHandler); }
DefaultRepresentationResult implements RepresentationResult { public <T> Serializer from(T object) { return from(object, null); } DefaultRepresentationResult(FormatResolver formatResolver, Result result, List<Serialization> serializations, RestHeadersHandler headersHandler); Serializer from(T object); Serializer from(T object, String alias); }
DefaultRepresentationResult implements RepresentationResult { public <T> Serializer from(T object) { return from(object, null); } DefaultRepresentationResult(FormatResolver formatResolver, Result result, List<Serialization> serializations, RestHeadersHandler headersHandler); Serializer from(T object); Serializer from(T object, String alias);  }