DATypeFactory { @Nonnull public static DAType from(@Nonnull Class<?> clazz) { return instance(clazz.getSimpleName(), clazz.getCanonicalName(), Collections.<DAType>emptyList()); } private  DATypeFactory(); @Nonnull static DAType voidDaType(); @Nonnull static DAType from(@Nonnull Class<?> clazz); @Nonnull static DAType from(@Nonnull Class<?> clazz, @Nonnull List<DAType> typeArgs); @Nonnull static DAType declared(@Nonnull String qualifiedName); @Nonnull static DAType declared(@Nonnull String qualifiedName, @Nonnull List<DAType> typeArgs); @Nonnull static DAType wildcardWithSuperBound(@Nonnull DAType superbound); @Nonnull static DAType wildcardWithExtendsBound(@Nonnull DAType extendsBound);  }
@Test(expectedExceptions = NullPointerException.class) public void from_with_types_null_qualifiedname_raises_NPE() throws Exception { DATypeFactory.from(null, Collections.<DAType>emptyList()); }
@Test(expectedExceptions = NullPointerException.class) public void fromWithTypes_null_daType_list_raises_NPE() throws Exception { DATypeFactory.from(this.getClass(), null); }
@Test public void from() throws Exception { DAType daType = DATypeFactory.from(getClass()); assertThat(daType.getKind()).isEqualTo(DATypeKind.DECLARED); assertThat(daType.getSimpleName().getName()).isEqualTo(getClass().getSimpleName()); assertThat(daType.getQualifiedName().getName()).isEqualTo(getClass().getCanonicalName()); assertThat(daType.getTypeArgs()).isEmpty(); }
@Test(expectedExceptions = NullPointerException.class) public void from_null_qualifiedname_raises_NPE() throws Exception { DATypeFactory.from(null); }