ProBInstanceProvider implements Provider<ProBInstance> { Map<Class<? extends AbstractCliPattern<?>>, AbstractCliPattern<?>> extractCliInformation( final BufferedReader input) { final PortPattern portPattern = new PortPattern(); final InterruptRefPattern intPattern = new InterruptRefPattern(); Map<Class<? extends AbstractCliPattern<?>>, AbstractCliPattern<?>> pattern = new HashMap<>(); pattern.put(PortPattern.class, portPattern); pattern.put(InterruptRefPattern.class, intPattern); analyseStdout(input, pattern.values()); return pattern; } @Inject  ProBInstanceProvider(final PrologProcessProvider processProvider,
			@Home final String home, final OsSpecificInfo osInfo, final Installer installer); @Override ProBInstance get(); ProBInstance create(); int numberOfCLIs(); void shutdownAll();  }
@Test public void testExtractCliInformation() { ProBInstanceProvider factory = Main.getInjector().getInstance( ProBInstanceProvider.class); String text = "No file to process\nStarting Socket Server\n" + "Application Path: /Users/bendisposto/.prob\nPort: 61013\n" + "probcli revision: $Rev$\nuser interrupt reference id: 57124\n" + "-- starting command loop --"; BufferedReader reader = new BufferedReader(new StringReader(text)); Map<Class<? extends AbstractCliPattern<?>>, AbstractCliPattern<?>> info = factory .extractCliInformation(reader); assertNotNull(info.get(InterruptRefPattern.class)); assertNotNull(info.get(PortPattern.class)); }