### Question:
TextureAtlasGenerator { public boolean shouldAddImage(final int imageWidth, final int imageHeight) { if (imageWidth < 0) { throw new IllegalArgumentException("image width must be non-negative"); } else if (imageHeight < 0) { throw new IllegalArgumentException("image height must be non-negative"); } return (imageWidth + atlasPadding) <= atlasWidth && (imageHeight + atlasPadding) <= atlasHeight && (imageWidth + atlasPadding) * (imageHeight + atlasPadding) / (float) (atlasWidth * atlasHeight) < atlasTolerance; } TextureAtlasGenerator(final int atlasWidth,
                               final int atlasHeight,
                               final int atlasPadding,
                               final float atlasTolerance); @Nullable Result addImage(final int imageWidth, final int imageHeight, @Nonnull final String imageName); boolean shouldAddImage(final int imageWidth, final int imageHeight); @Nullable Result removeImage(@Nonnull final String name); int getAtlasWidth(); int getAtlasHeight(); @Nonnull List<Result> rebuild(
      final int width,
      final int height); void reset();  }### Answer:
@Test public void testShouldAddValidImageReturnsTrue() { assertTrue(GENERATOR.shouldAddImage(30, 30)); }
@Test public void testShouldAddImageWiderAndTallerThanAtlasReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(101, 101)); }
@Test public void testShouldAddImageOnlyWiderThanAtlasReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(101, 1)); }
@Test public void testShouldAddImageOnlyTallerThanAtlasReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(1, 101)); }
@Test public void testShouldAddImageThatCouldFitInAtlasButNotWithinToleranceReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(50, 50)); }
@Test public void testShouldAddImageOnlyWiderThanAtlasWithPaddingReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(96, 1)); }
@Test public void testShouldAddImageOnlyTallerThanAtlasWithPaddingReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(1, 96)); }
@Test public void testShouldAddImageWiderAndTallerThanAtlasWithPaddingReturnsFalse() { assertFalse(GENERATOR.shouldAddImage(96, 96)); }