KewTypeBoServiceImpl implements KewTypeRepositoryService { @Override public KewTypeDefinition getTypeById(final String id) { if (StringUtils.isBlank(id)) { throw new RiceIllegalArgumentException("id is blank"); } KewTypeBo kewTypeBo = dataObjectService.find(KewTypeBo.class, id); return KewTypeBo.to(kewTypeBo); }  @Override KewTypeDefinition createKewType(KewTypeDefinition kewType); @Override void updateKewType(KewTypeDefinition kewType); @Override KewTypeDefinition getTypeById(final String id); @Override KewTypeDefinition getTypeByNameAndNamespace(final String name, final String namespace); @Override List<KewTypeDefinition> findAllTypesByNamespace(final String namespace); @Override List<KewTypeDefinition> findAllTypes(); void setDataObjectService(final DataObjectService dataObjectService); @Override void createKewTypeAttribute(KewTypeAttribute kewTypeAttribute); @Override void updateKewTypeAttribute(KewTypeAttribute kewTypeAttribute);  }
@Test(expected = IllegalArgumentException.class) public void testGetByPrimaryIdEmptyTypeId() { getKewTypeBoService().getTypeById(""); }
@Test(expected = IllegalArgumentException.class) public void testGetByPrimaryIdNullTypeId() { getKewTypeBoService().getTypeById(null); }