def METHOD_NAME(self):
    data = TimeSeries(name='test_ts', data=[1, 2, 3, 4, 5], unit='unit', timestamps=[1.1, 1.2, 1.3, 1.4, 1.5])
    msg = ('The name argument is ignored when adding an NWBContainer, ScratchData, or '
           'DynamicTable to scratch.')
    with self.assertWarnsWith(UserWarning, msg):
        self.nwbfile.add_scratch(data, name='Foo')
    self.assertIs(self.nwbfile.get_scratch('test_ts'), data)
    self.assertIs(self.nwbfile.scratch['test_ts'], data)