Code example for DefaultConversionService

0
	private ServletServerHttpResponse response; 
 
 
	@Before 
	public void setUp() { 
		ConversionService conversionService = new DefaultConversionService(); 
		this.converter = new ObjectToStringHttpMessageConverter(conversionService); 
 
		this.servletResponse = new MockHttpServletResponse(); 
		this.response = new ServletServerHttpResponse(this.servletResponse); 
	} 
 
	@Test 
	public void canRead() { 
		assertFalse(this.converter.canRead(Math.class, null)); 
		assertFalse(this.converter.canRead(Resource.class, null)); 
 
		assertTrue(this.converter.canRead(Locale.class, null)); 
		assertTrue(this.converter.canRead(BigInteger.class, null));