### Question:
JpaCategoryRepository implements CategoryRepository { @Override public Category get(String id) { return manager.find(JpaCategory.class, Long.parseLong(id)); }  @Override Class<? extends Category> getType(); @Override Category get(String id); @Override Category save(Category item); @Override void delete(Category item); @Override List<Category> getAll(); @Override List<Category> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override int removeFromCreatedOrModifiedFields(String userId);  }### Answer:
@Test public void getById_validId() { JpaCategory category = (JpaCategory) repository.get(VALID_ENTITY_ID.toString()); assertThat(category.getEntityId(), is(equalTo(VALID_ENTITY_ID))); }
@Test public void getById_invalidId() { assertThat(repository.get(INVALID_ENTITY_ID.toString()), is(nullValue())); }