NumFeld extends Feld { @Override public boolean isValid() { if (!super.isValid()) { return false; } if (this.isEmpty()) { return true; } try { this.toLong(); } catch (NumberFormatException nfe) { LOG.info(this + " is invalid: not a number (" + nfe + ")"); return false; } return true; } NumFeld(final Enum feldX);  NumFeld(final Enum feldX, final FeldInfo info);  NumFeld(final String name, final String s);  NumFeld(Bezeichner bezeichner, int length, int start);  NumFeld(final Bezeichner bezeichner, final int length, final int start, final int value);  NumFeld(final String name, final int start, final String value);  NumFeld(final String name, final String s, final int nachkommastellen);  NumFeld(final Bezeichner name, final FeldInfo info); @Deprecated  NumFeld(final String name, final int start, final String value,
            final int nachkommastellen);  NumFeld(final Bezeichner name, final int start, final String value, final int nachkommastellen);  NumFeld(final Bezeichner name, final int length, final int start, final int value,
            final int nachkommastellen);  NumFeld(final NumFeld other); NumFeld mitNachkommastellen(final int n); int getNachkommastellen(); @Override void setInhalt(final int n); void setInhalt(final long n); @Override void resetInhalt(); int toInt(); long toLong(); double toDouble(); @Override boolean isValid(); @Override List<ConstraintViolation> validate(); @Override String format(); @SuppressWarnings("squid:S2975") @Override Object clone();  }
@Test public void testIsInvalid() { NumFeld x = new NumFeld("x", "xxxx"); assertFalse(x + " is invalid", x.isValid()); }
@Test public void testIsValid() { NumFeld three = new NumFeld("testIsValid", "3 "); assertTrue("should be valid", three.isValid()); }