public static <T> Middleware<SyncHandler<T>, AsyncHandler<Response<ByteString>>> htmlSerializeSync(
      final String templateName) {
    Middleware<SyncHandler<T>, AsyncHandler<T>> syncToAsync = Middleware::syncToAsync;
    return syncToAsync.and(htmlSerialize(templateName));
  }
public static < T > Middleware < SyncHandler < T > , AsyncHandler < Response < ByteString > > > htmlSerializeSync ( final String templateName ) { Middleware < SyncHandler < T > , AsyncHandler < T > > syncToAsync = Middleware :: syncToAsync ; return syncToAsync . and ( htmlSerialize ( templateName ) ) ; }
Sync middleware for POJO.

@param templateName The template name, respective to the "resources" folder
@param <T>          The Type of the parameters
@return the middlware