### Question:
VideoRecordingFileName { public String getByDeviceOrDefault() { String name = getByDevice(); if (StringUtils.isEmpty(name)) { name = recordingId.toString() + ".mp4"; } return name; } VideoRecordingFileName(
         UUID recordingId,
         UUID cameraId,
         UUID placeId,
         DeviceDAO deviceDAO,
         PlaceDAO placeDAO
         ); String getByDeviceOrDefault(); String getByDevice(); String getFileName(String prefix, String suffix); String getDateSuffix(Place place); String localDateSuffix(Place place, Date date);  }### Answer:
@Test public void getByDeviceOrDefault() throws ParseException { DateFormat utcFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss.SSS"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); Date date = utcFormat.parse("06/01/2015 11:20:04.453"); UUID recordingId = IrisUUID.timeUUID(date); UUID cameraId = IrisUUID.randomUUID(); Place place = Fixtures.createPlace(); place.setTzId("US/Central"); PlaceDAO placeDAO = createNiceMock(PlaceDAO.class); expect(placeDAO.findById(place.getId())).andStubReturn(place); Device camera = Fixtures.createDevice(); camera.setId(cameraId); camera.setName(""); DeviceDAO deviceDAO = createNiceMock(DeviceDAO.class); expect(deviceDAO.findById(cameraId)).andStubReturn(camera); VideoRecordingFileName sut = new VideoRecordingFileName( recordingId, cameraId, place.getId(), deviceDAO, placeDAO); replay(placeDAO); replay(deviceDAO); String result = sut.getByDeviceOrDefault(); Assert.assertEquals(recordingId + ".mp4", result); }