minor improvement
add type parameter to StreamEntity
simplify tests