PXEConfigTFTProvider implements TFTPProvider { protected String compressTemplate(String processed) { processed = processed.replaceAll("\\r", ""); processed = processed.replaceAll("\\\\[\\t ]*\\n", ""); processed = processed.replaceAll("[\\t ]+", " "); return processed; } PXEConfigTFTProvider(Path tftpHome, RealmService realmService, ClientService clientService, Path fallbackTemplatePath); long getLength(SocketAddress peer, SocketAddress local, String arg0,
                        String arg1); InputStream getStream(SocketAddress peer, SocketAddress local,
                               String prefix, String fileName); static final Pattern TEMPLATE_REPLACEMENT_PATTERN; }
@Test public void testCompressTemplate() throws Exception { final PXEConfigTFTProvider provider = createProvider(); final MapPropertySource propertySource = createPropertySource(); final String processed = provider.resolveVariables(DEFAULT_TEMPLATE, propertySource); final String result = provider.compressTemplate(processed); assertEquals(COMPRESSED_TEMPLATE, result); }