- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ScheduledThreadPoolExecutor s =
new ScheduledThreadPoolExecutor(corePoolSize)
ThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
String str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
- Smart code suggestions by Codota
}
@Override public void run() { context.execute(); ShellResponse response = context.getResponse(); assertInstance(ShellResponse.Cancelled.class, response); } };
@Override protected void execute(TestPluginLifeCycle lifeCycle, Wiser wiser) throws IOException, MessagingException, ExecutionException, InterruptedException { Shell shell = lifeCycle.createShell(); lifeCycle.bindClass("produce", Commands.ProduceValue.class); lifeCycle.bindClass("consume", Commands.ConsumeObject.class); Commands.list.clear(); BaseProcessContext process = BaseProcessContext.create(shell, "produce | mail send -s the_subject -b admin@gmail.com | consume").execute(); ShellResponse.Ok ok = assertInstance(ShellResponse.Ok.class, process.getResponse()); Assert.assertEquals(1, wiser.getMessages().size()); WiserMessage msg = wiser.getMessages().get(0); Assert.assertEquals("foo@gmail.com", msg.getEnvelopeSender()); Assert.assertEquals("admin@gmail.com", msg.getEnvelopeReceiver()); Assert.assertEquals("the_subject", msg.getMimeMessage().getSubject()); String data = new String(msg.getData()); String content = (String)msg.getMimeMessage().getContent(); assertTrue(content.contains("<value>abc</value>")); assertTrue(data.contains("Content-Type: text/html;charset=UTF-8")); System.out.println("data = " + data); assertEquals(Arrays.<Object>asList(new Value("abc")), Commands.list); } };