Hide dangerous method and add interfaces when unit test