code: protected void validate(STGroup stg, Map<String, Set<String>> expectedChunks){
  		for (String s : expectedChunks.keySet()){
  			//null and "" are no valid templates, so we ignore them
  			if(s!=null && !"".equals(s)){
  				if(stg.isDefined(s)){
  					STValidator stv = new STValidator(stg.getInstanceOf(s), expectedChunks.get(s));
  					this.errors.addAllErrors(stv.getValidationErrors());
  				}
  				else{
  					this.errors.addError("STGroup <{}> does not define mandatory template <{}>", GET_STG_NAME(stg), s);
  				}
  			}
  		}
  	}
docs: Does the actual validation of the STGroup.
  @param stg the STGroup to validate
  @param expectedChunks the expected chunks (methods and their arguments) to validate against