A device for testing a coating of a document, comprising: an image sensor; an illumination device comprising a test structure, wherein the illumination device is configured to illuminate the test structure in order to emit structured light towards the document; a holder arranged in the beam path of the structured light, wherein the document is insertable into the holder in order to reflect the structured light through the document towards the image sensor; a processor, which is configured to determine an image parameter of the image recording of the test structure and to compare the image parameter with a reference parameter in order to test the coating of the document, wherein the test structure is a grating, wherein the processor is configured to detect the coating if the image parameter and the reference parameter are different, wherein the processor is configured to determine a layer thickness of the coating of the document based on the difference between the image parameter and the reference parameter, wherein the image parameter is associated with an image section of the image recording, wherein the processor is configured to determine a further image parameter of a further image section of the image recording of the test structure, and wherein the processor is configured to compare the image parameter and the further image parameter with the reference parameter in order to test the distribution or the homogeneity of a layer thickness of the coating of the document, wherein at least one uncoated reference surface is insertable into the holder adjacent to the document, wherein a first image section of the image recording is associated with the document, wherein a second image section of the image recording is associated with the uncoated reference surface, and wherein the processor is configured to determine the reference parameter as image parameter of the second image section, wherein the uncoated reference surface is a document without a coating, where the respective image parameter is the following image parameter: modulation transfer function, wherein the processor is configured to determine a loss of contrast in the image of the test structure, wherein the processor is configured to analyze a contrast curve in the image of the test structure for this purpose, wherein this analysis is performed with the document with the coating and with the document without coating, wherein the image parameter of the at least one uncoated reference surface is used as a reference parameter in this analysis. an image sensor; an illumination device comprising a test structure, wherein the illumination device is configured to illuminate the test structure in order to emit structured light towards the document; a holder arranged in the beam path of the structured light, wherein the document is insertable into the holder in order to reflect the structured light through the document towards the image sensor; a processor, which is configured to determine an image parameter of the image recording of the test structure and to compare the image parameter with a reference parameter in order to test the coating of the document, wherein the test structure is a grating, wherein the processor is configured to detect the coating if the image parameter and the reference parameter are different, wherein the processor is configured to determine a layer thickness of the coating of the document based on the difference between the image parameter and the reference parameter, wherein the image parameter is associated with an image section of the image recording, wherein the processor is configured to determine a further image parameter of a further image section of the image recording of the test structure, and wherein the processor is configured to compare the image parameter and the further image parameter with the reference parameter in order to test the distribution or the homogeneity of a layer thickness of the coating of the document, wherein at least one uncoated reference surface is insertable into the holder adjacent to the document, wherein a first image section of the image recording is associated with the document, wherein a second image section of the image recording is associated with the uncoated reference surface, and wherein the processor is configured to determine the reference parameter as image parameter of the second image section, wherein the uncoated reference surface is a document without a coating, where the respective image parameter is the following image parameter: modulation transfer function, wherein the processor is configured to determine a loss of contrast in the image of the test structure, wherein the processor is configured to analyze a contrast curve in the image of the test structure for this purpose, wherein this analysis is performed with the document with the coating and with the document without coating, wherein the image parameter of the at least one uncoated reference surface is used as a reference parameter in this analysis.