If you were looking at the log of your application server, you would notice an error telling you that test1 is not a class so it does not make sense to use that here, something like:
Script4.groovy: 16: unable to resolve class test1
To summarize, a component has a role type and a role hint. In the case of your test1ScriptService component the role type is org.xwiki.script.service.ScriptService and the role hint is "test1".
So the injection for this specific component should look more like: