NessComputing/velocity-guice — comment on commit 043da70e3e143ae0d4f2b2fdacdec57ddab9f25c
File: src/test/java/com/nesscomputing/velocity/VelocityGuiceModuleTest.java line 44
By stevenschlansker:

Hi,

This is only done in test cases to inject on an already-instantiated object (the test case itself)

Usually, you will get a Template via a constructor (or an @Inject method)

for example:

```
@Inject
public MyCoolObject(@Named("my_template") Template myTemplate) {
this.myTemplate = myTemplate;
}
```