Citing JUnits homepage: "JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks."
According to a the answer of this question: Library vs. framework vs API?, a framework is "a collection of patterns and libraries to help with building an application" and library is defined as "a collection of functions / objects that serves one particular purpose. you could use a library in a variety of projects".
As a framework is said to have collection of libraries, why is junit called a framework and not a library?