org.apache.dubbo.config.spring.ServiceBean#getSpringContext looks like a hack, we need to remove it.
import org.springframework.context.ApplicationContext;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.MockitoAnnotations.initMocks;
public class DataSourceStatusCheckerTest {
    private DataSourceStatusChecker dataSourceStatusChecker;
    @Mock
    private ApplicationContext applicationContext;
    @Before
    public void setUp() throws Exception {
        initMocks(this);
        this.dataSourceStatusChecker = new DataSourceStatusChecker();
        new ServiceBean<Object>().setApplicationContext(applicationContext);
    }
    @Test
    public void testWithoutApplicationContext() {
        Status status = dataSourceStatusChecker.check();
        assertThat(status.getLevel(), is(Status.Level.UNKNOWN));
    }
    @Test
    public void testWithoutDatasource() {