@Test
  public void testSetAttribute_onCreate_failsForAttributeThatIsNotSettableOnCreate() {
    File file = createFile();
    try {
      service.setInitialAttributes(file, new BasicFileAttribute<>("test:foo", "world"));
      fail();
    } catch (UnsupportedOperationException expected) {
      // it turns out that UOE should be thrown on create even if the attribute isn't settable
      // under any circumstances
    }

    try {
      service.setInitialAttributes(file, new BasicFileAttribute<>("test:bar", 5));
      fail();
    } catch (UnsupportedOperationException expected) {
    }
  }
Tests for {@link AttributeService}.

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