@Test
public void testEquals() throws Exception {

  DefaultContentMetadata metadata1 =
      createContentMetadata(
          "metadata1", "value", "metadata2", 12345, "metadata3", new byte[] {1, 2, 3});
  DefaultContentMetadata metadata2 =
      createContentMetadata(
          "metadata2", 12345, "metadata3", new byte[] {1, 2, 3}, "metadata1", "value");
  assertThat(metadata1).isEqualTo(metadata2);
  assertThat(metadata1.hashCode()).isEqualTo(metadata2.hashCode());
}