DefaultDocumentQueryMapperBuilder implements DocumentQueryMapperBuilder { @Override public <T> DocumentMapperFrom selectFrom(Class<T> entityClass) { requireNonNull(entityClass, "entity is required"); ClassMapping mapping = mappings.get().get(entityClass); return new DefaultDocumentMapperSelectBuilder(mapping, converters.get()); }  @Override DocumentMapperFrom selectFrom(Class<T> entityClass); @Override DocumentMapperDeleteFrom deleteFrom(Class<T> entityClass);  }
@Test public void shouldReturnErrorWhenEntityClassIsNull() { assertThrows(NullPointerException.class, () -> mapperBuilder.selectFrom(null)); }
@Test public void shouldReturnSelectFrom() { DocumentMapperFrom documentFrom = mapperBuilder.selectFrom(Person.class); assertNotNull(documentFrom); }