@Test
public void testAroundWriteWithExtensionContextWithExtendedType()
	throws IOException {

	JAXRSExtensionContextUtil.TestObject testObject =
		JAXRSExtensionContextUtil.getTestObject();
	ArgumentCaptor<ExtendedEntity> argumentCaptor = ArgumentCaptor.forClass(
		ExtendedEntity.class);
	Mockito.when(
		_mockedWriterInterceptorContext.getEntity()
	).thenReturn(
		testObject
	);
	Mockito.when(
		_mockedWriterInterceptorContext.getType()
	).thenReturn(
		(Class)testObject.getClass()
	);
	_entityExtensionWriterInterceptor.aroundWriteTo(
		_mockedWriterInterceptorContext);
	Mockito.verify(
		_mockedWriterInterceptorContext
	).setEntity(
		argumentCaptor.capture()
	);
	ExtendedEntity extendedEntity = argumentCaptor.getValue();
	Assert.assertEquals(testObject, extendedEntity.getEntity());
	Assert.assertEquals(
		JAXRSExtensionContextUtil.getTestExtendedProperties(),
		extendedEntity.getExtendedProperties());
	Mockito.verify(
		_mockedWriterInterceptorContext
	).setGenericType(
		eq(ExtendedEntity.class)
	);
	Mockito.verify(
		_mockedWriterInterceptorContext
	).proceed();
}