W1Master { public List<W1Device> getDevices() { return Collections.unmodifiableList(devices); } W1Master();  W1Master(final ClassLoader classloader);  W1Master(final String masterDir);  W1Master(final String masterDir, final ClassLoader classloader); void checkDeviceChanges(); Collection<W1DeviceType> getDeviceTypes(); Map<String, W1DeviceType> getDeviceTypeMap(); List<String> getDeviceIDs(); List<W1Device> getDevices(); @SuppressWarnings("unchecked") List<T> getDevices(final int deviceFamilyId); @SuppressWarnings("unchecked") List<T> getDevices(final Class<T> type); @SuppressWarnings("unchecked") List<T> getW1Devices(final Class<T> type); @Override String toString();  }
@Test public void thereShouldBeADummyDevice() { final List<W1Device> devices = master.getDevices(); assertEquals(1, devices.size()); final W1Device dummyDevice = devices.get(0); assertTrue(dummyDevice instanceof W1DummyDeviceType.W1DummyDevice); assertEquals("FE-00000698ebb3 Dummy Device", dummyDevice.getName()); }
@Test public void thereShouldBeNoDevicesForFamily28() { assertEquals(0, master.getDevices(0x28).size()); }
@Test public void thereShouldBeOneDummyDevicesForFamilyFE() { assertEquals(1, master.getDevices(W1DummyDeviceType.FAMILY_ID).size()); }