Construction and testing of an Epstein apparatus for the determination of magnetic losses