ApplicationConfigTest.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:servlet4-demo 作者:
@Before
public void setUp() {
  sut = new ApplicationConfig();
  server = mock(Server.class);
  registry = mock(InterceptorRegistry.class);
  when(server.getThreadPool()).thenReturn(new ThreadPool() {
    @Override
    public void join() throws InterruptedException {
      // Do nothing. This is just a unit test.
    }

    @Override
    public int getThreads() {
      return 0;
    }

    @Override
    public int getIdleThreads() {
      return 0;
    }

    @Override
    public boolean isLowOnThreads() {
      return false;
    }

    @Override
    public void execute(Runnable command) {
      // Do nothing. This is just a unit test.
    }
  });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号