@Test
public void testGetDocumentPayload() throws Exception {

	Mockito.when(
		_fileEntry.getFileVersion()
	).thenReturn(
		_fileVersion
	);
	String randomString = RandomTestUtil.randomString();
	Mockito.when(
		_fileVersion.getContentStream(false)
	).thenReturn(
		new ByteArrayInputStream(randomString.getBytes())
	);
	Assert.assertEquals(
		GCloudNaturalLanguageUtil.getDocumentPayload(
			randomString, StringPool.BLANK),
		GCloudNaturalLanguageUtil.getDocumentPayload(
			GCloudNaturalLanguageUtil.truncateToSize(
				new String(
					FileUtil.getBytes(
						_fileVersion.getContentStream(false))),
				5000),
			StringPool.BLANK));
}