### Question:
EntityBuilder { public abstract Entity build(); protected  EntityBuilder(EntityType typ); EntityBuilder setId(long eid); abstract EntityBuilder setAttribute(TypedName<T> name, T val); EntityBuilder setAttribute(Attribute<T> attr); EntityBuilder setLongAttribute(TypedName<Long> name, long val); EntityBuilder setDoubleAttribute(TypedName<Double> name, double val); abstract EntityBuilder clearAttribute(TypedName<?> name); @OverridingMethodsMustInvokeSuper EntityBuilder reset(); abstract Entity build();  }### Answer:
@Test public void testBareEntity() { EntityBuilder eb = Entities.newBuilder(CommonTypes.USER, 42); Entity e = eb.build(); assertThat(e, notNullValue()); assertThat(e.getType(), equalTo(CommonTypes.USER)); assertThat(e.getId(), equalTo(42L)); assertThat(e.getTypedAttributeNames(), contains((TypedName) CommonAttributes.ENTITY_ID)); assertThat(e.getAttributeNames(), contains("id")); assertThat(e.get(CommonAttributes.ENTITY_ID), equalTo(42L)); assertThat(e.get("id"), equalTo((Object) 42L)); }