StreamResource
add some test class and modified some code