@Test public void testBasics() throws Exception { final byte[] bytes = "Message content".getBytes(StandardCharsets.ISO_8859_1); final InputStream inStream = new ByteArrayInputStream(bytes); final InputStreamEntity httpentity = new InputStreamEntity(inStream, bytes.length); Assert.assertEquals(bytes.length, httpentity.getContentLength()); Assert.assertEquals(inStream, httpentity.getContent()); Assert.assertNotNull(httpentity.getContent()); Assert.assertFalse(httpentity.isRepeatable()); Assert.assertTrue(httpentity.isStreaming()); }