ByteArrayResource implements Resource { public byte[] getBytes() { return bytes; } ByteArrayResource(String location, byte[] bytes); @Override Stream<String> getAllLocations(); byte[] getBytes(); @Override URL getResource(String location); @Override InputStream getResourceAsStream(String location);  }
@Test void testGetBytes() { ByteArrayResource resource = new ByteArrayResource("", null); assertNull(resource.getBytes()); }