### Question:
ResourceLoader { public ResourceLoader() { super(); } ResourceLoader(); synchronized void add(T key, Resource resource); synchronized void start(); synchronized void await(); synchronized Map<T, Resource> get(); boolean isFinished();  }### Answer:
@Test void testResourceLoader() { final ResourceLoader<Type> resourceLoader = new ResourceLoader<>(); final Image resource = Drawable.loadImage(Medias.create("image.png")); resourceLoader.add(Type.TEST, resource); assertFalse(resource.isLoaded()); assertNull(resource.getSurface()); assertFalse(resourceLoader.isFinished()); resourceLoader.start(); resourceLoader.await(); assertTrue(resource.isLoaded()); assertNotNull(resource.getSurface()); assertTrue(resourceLoader.isFinished()); assertEquals(resourceLoader.get().get(Type.TEST), resource); }