JavaxDANameFactory { @Nonnull public static DAName from(@Nonnull Name name) { return new DANameImpl(name.toString()); } private  JavaxDANameFactory(); @Nonnull static DAName from(@Nonnull Name name);  }
@Test public void from_Name() throws Exception { Name mock = Mockito.mock(Name.class); when(mock.toString()).thenReturn(TOTO); assertThat(JavaxDANameFactory.from(mock).getName()).isEqualTo(TOTO); }