EnqueuedMailsDaoUtil { @VisibleForTesting static List<Attribute> toAttributes(Map<String, ByteBuffer> rowAttributes) { return rowAttributes.entrySet() .stream() .map(entry -> new Attribute(AttributeName.of(entry.getKey()), fromByteBuffer(entry.getValue()))) .collect(ImmutableList.toImmutableList()); }    }
@Test void toAttributesShouldReturnEmptyWhenEmptyRawAttributeMap() { ImmutableMap<String, ByteBuffer> attrMap = ImmutableMap.of(); assertThat(EnqueuedMailsDaoUtil.toAttributes(attrMap)) .isEmpty(); }