@Test
public void createWidgetAnnotationFromField()
{

    PDDocument document = new PDDocument();
    PDAcroForm acroForm = new PDAcroForm(document);
    PDTextField textField = new PDTextField(acroForm);
    PDAnnotation annotation = textField.getWidgets().get(0);
    assertEquals(COSName.ANNOT, annotation.getCOSObject().getItem(COSName.TYPE));
    assertEquals(PDAnnotationWidget.SUB_TYPE,
        annotation.getCOSObject().getNameAsString(COSName.SUBTYPE));
}