### Question:
NameProvider { public static NameProvider create(Name<String> resource) { Objects.requireNonNull(resource,"Owner name cannot be null"); return new NameProvider(resource); } private  NameProvider(Name<String> owner); Name<String> owner(); List<Name<String>> pendingAttachmentNames(String attachmentId); List<Name<String>> pendingResourceNames(); List<Name<String>> pendingMemberNames(); void addResourceName(Name<String> nextName); void addMemberName(Name<String> nextName); void addAttachmentName(String attachmentId, Name<String> nextName); Name<String> nextResourceName(); Name<String> nextMemberName(); Name<String> nextAttachmentName(String attachmentId); static NameProvider create(Name<String> resource);  }### Answer:
@Test public void testCreate$nonNull() throws Exception { Name<String> owner = name("test"); NameProvider sut = NameProvider.create(owner); assertThat(sut,notNullValue()); assertThat(sut.owner(),equalTo(owner)); assertThat(sut.pendingMemberNames(),hasSize(0)); assertThat(sut.pendingResourceNames(),hasSize(0)); }
@Test(expected=NullPointerException.class) public void testCreate$null() throws Exception { NameProvider.create(null); }