@Test
public void getBinaryValues()
{

  final List<byte[]> jpegPhotos = new ArrayList<>();
  jpegPhotos.add("image1".getBytes());
  jpegPhotos.add("image2".getBytes());
  final List<String> stringJpegPhotos = new ArrayList<>();
  stringJpegPhotos.add("aW1hZ2Ux");
  stringJpegPhotos.add("aW1hZ2Uy");
  final LdapAttribute la = new LdapAttribute();
  la.setName("jpegPhoto");
  la.addBinaryValues(jpegPhotos);
  Assert.assertNotNull(la.getStringValue());
  Assert.assertNotNull(la.getStringValues());
  Assert.assertNotNull(la.getBinaryValue());
  Assert.assertNotNull(la.getBinaryValues());
  Assert.assertEquals(la.getStringValues().size(), 2);
  Assert.assertEquals(la.getBinaryValues().size(), 2);
  Assert.assertTrue(la.getStringValues().contains("aW1hZ2Ux"));
  Assert.assertTrue(la.getStringValues().contains("aW1hZ2Uy"));
  Assert.assertEqualsNoOrder(stringJpegPhotos.toArray(new String[2]), la.getStringValues().toArray(new String[2]));
  Assert.assertEquals(la.getBinaryValues().size(), jpegPhotos.size());
  for (byte[] b : jpegPhotos) {
    Assert.assertTrue(la.getBinaryValues().stream().anyMatch(a -> Arrays.equals(a, b)));
  }
  la.clear();
  Assert.assertEquals(la.size(), 0);
}