@Test
  public void testGettingAndSetting() {
    byte[] bytes = {0, 1, 2, 3};
    provider.set(file, "user", "one", bytes, false);
    provider.set(file, "user", "two", ByteBuffer.wrap(bytes), false);

    byte[] one = (byte[]) provider.get(file, "one");
    byte[] two = (byte[]) provider.get(file, "two");
    assertThat(Arrays.equals(one, bytes)).isTrue();
    assertThat(Arrays.equals(two, bytes)).isTrue();

    assertSetFails("foo", "hello");

    assertThat(provider.attributes(file)).containsExactly("one", "two");
  }
Tests for {@link UserDefinedAttributeProvider}.

@author Colin Decker
jimfs/src/test/java/com/google/common/jimfs/UserDefinedAttributeProviderTest.java