### Question:
Transformers { static Optional<GoogleDeviceInfo> modelToDeviceInfo(Model m) { if(m == null || !m.supports(DeviceCapability.NAMESPACE)) { return Optional.empty(); } GoogleDeviceInfo info = new GoogleDeviceInfo(); info.setManufacturer(DeviceModel.getVendor(m)); info.setModel(DeviceModel.getModel(m)); return Optional.of(info); } private  Transformers(); static Optional<GoogleDevice> modelToDevice(Model m, boolean whitelisted, @Nullable ProductCatalogEntry pm, boolean reportStateEnabled); static Map<String,Object> modelToStateMap(Model m, boolean hubOffline, boolean whitelisted, @Nullable ProductCatalogEntry pm); static Optional<MessageBody> commandToMessageBody(Model m, boolean hubOffline, String command, Map<String, Object> params, boolean whitelisted, @Nullable ProductCatalogEntry pm); static PlatformMessage requestToMessage(Request req, UUID placeId, String population, int ttl); static Response messageToResponse(PlatformMessage msg); static final Gson GSON; static final String PRODUCT_ID; static final String TYPE_HINT; }### Answer:
@Test public void testModelToDeviceInfo() { assertEquals(Optional.empty(), Transformers.modelToDeviceInfo(null)); assertEquals(Optional.empty(), Transformers.modelToDeviceInfo(nonDevModel)); assertDeviceInfo(devInfo, Transformers.modelToDeviceInfo(unsupportedDev).get()); }